File tree 2 files changed +14
-7
lines changed
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -767,14 +767,17 @@ def check_tx(
767
767
tx_mint_by_token == db_mint_txouts
768
768
), f"MA minting outputs don't match ({ tx_mint_by_token } != { db_mint_txouts } )"
769
769
770
- len_db_withdrawals = len (response .withdrawals )
771
- len_out_withdrawals = len (tx_raw_output .withdrawals )
770
+ tx_withdrawals = sorted (
771
+ [* tx_raw_output .withdrawals , * [s .txout for s in tx_raw_output .script_withdrawals ]]
772
+ )
773
+ db_withdrawals = sorted (response .withdrawals )
774
+ len_tx_withdrawals = len (tx_withdrawals )
775
+ len_db_withdrawals = len (db_mint_txouts )
776
+
772
777
assert (
773
- len_db_withdrawals == len_out_withdrawals
774
- ), f"Number of TX withdrawals doesn't match ({ len_db_withdrawals } != { len_out_withdrawals } )"
778
+ len_db_withdrawals == len_tx_withdrawals
779
+ ), f"Number of TX withdrawals doesn't match ({ len_db_withdrawals } != { len_tx_withdrawals } )"
775
780
776
- tx_withdrawals = sorted (tx_raw_output .withdrawals )
777
- db_withdrawals = sorted (response .withdrawals )
778
781
assert (
779
782
tx_withdrawals == db_withdrawals
780
783
), f"TX withdrawals don't match ({ tx_withdrawals } != { db_withdrawals } )"
Original file line number Diff line number Diff line change @@ -250,8 +250,12 @@ def check_tx_view( # noqa: C901
250
250
withdrawal_amount = int (withdrawal ["amount" ].split ()[0 ] or 0 )
251
251
loaded_withdrawals .add ((withdrawal_key , withdrawal_amount ))
252
252
253
+ tx_raw_withdrawals_encoded = [
254
+ * tx_raw_output .withdrawals ,
255
+ * [s .txout for s in tx_raw_output .script_withdrawals ],
256
+ ]
253
257
tx_raw_withdrawals = {
254
- (helpers .decode_bech32 (r .address )[2 :], r .amount ) for r in tx_raw_output . withdrawals
258
+ (helpers .decode_bech32 (r .address )[2 :], r .amount ) for r in tx_raw_withdrawals_encoded
255
259
}
256
260
257
261
if tx_raw_withdrawals != loaded_withdrawals :
You can’t perform that action at this time.
0 commit comments