Skip to content

Commit

Permalink
unconfirmed tx height fix
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Trzeszczkowski <[email protected]>
  • Loading branch information
KarolTrzeszczkowski committed Feb 8, 2020
1 parent 3bbe2bb commit bba8b31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mecenas/contract_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions mecenas/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bba8b31

Please sign in to comment.