Skip to content

Commit f1239a8

Browse files
committed
fix wait_for_transaction_id
1 parent 4739e0f commit f1239a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tronapi/common/transactions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ def wait_for_transaction_id(tron, tx_id, timeout=120, poll_latency=0.1):
66
while True:
77
tx_detail = tron.trx.get_transaction(tx_id)
88
# FIXME: The check for a null `ref_block_hash` is due to parity's
9-
if tx_detail is not None and tx_detail['ref_block_hash'] is not None:
9+
if tx_detail is not None and \
10+
'raw_data' in tx_detail and \
11+
tx_detail['raw_data']['ref_block_hash'] is not None:
1012
break
1113
_timeout.sleep(poll_latency)
1214
return tx_detail

0 commit comments

Comments
 (0)