safe-client-gateway
safe-client-gateway copied to clipboard
Non-swap transfers emit unnecessary warning logs
Description
In general, we decode/map swap transfers before "standard" ones. An inherent check for whether a transfer is swap related is checking whether the transaction interacts with the settlment contract. If it doesn't, we throw and the transaction is later mapped as a "standard" transfer.
In general, the throwing behaviour matches the pattern for all "external" mapping, e.g. swaps, TWAPs and staking. However, this is logging for every non-settlement contract-based transfer.
Reproduction steps
- Open a Safe with a non-swap-based transfer.
- Observe warning.
Expected behavior
No warning is emitted for non-swap-based transfers.
Additional information
Possible solutions: we either don't warn about this, or hoist the settlement contract check and only call mapSwapTransferInfo
if it is indeed interacting with it.