File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ def get_tezos_txn_status(fulfillment):
46
46
47
47
tx_response = requests .get (f'{ BASE_URL } /operations/{ txnid } ' ).json ()
48
48
49
- if tx_response :
49
+ # a valid response will return a list whereas an invalid response will return a dict
50
+ if tx_response and isinstance (tx_response , list ) and len (tx_response ) > 0 :
50
51
tx_response = tx_response [0 ]
51
52
block_tip = requests .get (f'{ BASE_URL } /head' ).json ()['level' ]
52
53
confirmations = block_tip - tx_response ['level' ]
@@ -70,7 +71,7 @@ def sync_tezos_payout(fulfillment):
70
71
if txn :
71
72
fulfillment .payout_tx_id = txn ['hash' ]
72
73
fulfillment .save ()
73
-
74
+
74
75
if fulfillment .payout_tx_id and fulfillment .payout_tx_id != "0x0" :
75
76
txn_status = get_tezos_txn_status (fulfillment )
76
77
You can’t perform that action at this time.
0 commit comments