safe-client-gateway icon indicating copy to clipboard operation
safe-client-gateway copied to clipboard

Non-swap transfers emit unnecessary warning logs

Open iamacook opened this issue 5 months ago • 0 comments

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

  1. Open a Safe with a non-swap-based transfer.
  2. 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.

iamacook avatar Sep 24 '24 10:09 iamacook