check that swaps involve both pool assets (#328)

Co-authored-by: pintail <you@example.com>
This commit is contained in:
pintail-xyz 2023-02-09 00:01:36 +07:00 committed by GitHub
parent 297afec364
commit b6777a25dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,6 +94,9 @@ def create_swap_from_pool_transfers(
transfer_in = transfers_to_pool[-1]
transfer_out = transfers_from_pool_to_recipient[0]
if transfer_in.token_address == transfer_out.token_address:
return None
return Swap(
abi_name=trace.abi_name,
transaction_hash=trace.transaction_hash,