diff --git a/mecenas/contract_finder.py b/mecenas/contract_finder.py index 8231aab..a4f9105 100644 --- a/mecenas/contract_finder.py +++ b/mecenas/contract_finder.py @@ -10,13 +10,14 @@ def find_contract_in_wallet(wallet, contract_cls): continue response = wallet.network.synchronous_get( ("blockchain.scripthash.listunspent", [contract.address.to_scripthash_hex()])) - print(contract.address.to_ui_string()) + #print(contract.address.to_ui_string()) if unfunded_contract(response): # skip unfunded and ended contracts continue a=contract.addresses print("hello there", contract.address.to_ui_string()) contract_tuple_list.append((response, contract, find_my_role(a, wallet))) + remove_duplicates(contract_tuple_list) return contract_tuple_list diff --git a/mecenas/ui.py b/mecenas/ui.py index d904cca..790f624 100755 --- a/mecenas/ui.py +++ b/mecenas/ui.py @@ -433,6 +433,8 @@ def add_item(self, u, parent_item, t, m): def get_age(self, entry): txHeight = entry.get("height") + if not txHeight: + txHeight = self.main_window.network.get_local_height() blockchain = self.main_window.network.blockchain() mtp = blockchain.get_median_time_past # in epoch seconds currentHeight = self.main_window.network.get_local_height()