@@ -148,26 +148,24 @@ def confirm_payments_for_event(self, event: Event, no_dry_run, log_verbosity=0):
148148 ).value
149149 receipt_reciever = receipt .to .lower ()
150150 correct_recipient = (
151- receipt_reciever == signed_message .recipient_address .lower ()
151+ receipt_reciever == signed_message .recipient_address .lower ()
152152 )
153153
154154 else :
155155 # DAI
156156 contract = w3 .eth .contract (address = token .ADDRESS ,
157157 abi = TOKEN_ABI )
158158 transaction_details = (
159- contract .events .Transfer ().processReceipt (receipt )[
160- 0 ].args
159+ contract .events .Transfer ().processReceipt (receipt )[0 ].args
161160 )
162161 payment_amount = transaction_details .value
163162 # check that the payment happened on the right contract address
164163 correct_contract = token .ADDRESS .lower () == receipt .to .lower ()
165164 # take recipient address from the topics,
166165 # not from the "from" field, as that's the contract address
167- receipt_reciever = receipt .logs [0 ].topics [2 ][
168- 12 :].hex ().lower ()
166+ receipt_reciever = receipt .logs [0 ].topics [2 ][12 :].hex ().lower ()
169167 correct_recipient = correct_contract and (
170- receipt_reciever == signed_message .recipient_address .lower ()
168+ receipt_reciever == signed_message .recipient_address .lower ()
171169 )
172170
173171 receipt_sender = getattr (receipt , "from" ).lower ()
@@ -176,7 +174,7 @@ def confirm_payments_for_event(self, event: Event, no_dry_run, log_verbosity=0):
176174 if not (correct_sender and correct_recipient ):
177175 logger .warning (
178176 f" * Transaction hash provided does not match "
179- f "correct sender and recipient"
177+ "correct sender and recipient"
180178 )
181179 if log_verbosity > 0 :
182180 logger .info (
0 commit comments