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

Investigate using mappers for `transaction-confirmation` endpoint

Open iamacook opened this issue 5 months ago • 0 comments

Description

We have TransactionInfo mappers for the transaction queue/history, built upon multiple Transaction Service endpoint responses. They map a multitude of Safe transaction types, e.g. various settings changes, swaps, etc.

With swaps, we created a new transaction-confirmation endpoint responsible for returning transaction info. pre-proposal. On a high level, this works by decoding the transaction data for a subset of swap/staking TransactionInfo. As the data structure is relatively similar, we should investigate whether we could reuse the aforementioned mappers to reduce duplication.

Requirements

The following should be conducted on a singular mapper and, providing it is possible, done mapper-by-mapper.

  • Reseach feasibility of the above.
  • Providing there is consensys on pre-proposing transactions, either use mappers directly or decoded transaction data and map/pass it accordingly.
  • Add appropriate test coverage.

Additional information

It was suggested that transactions could always be proposed and the mappers would then work as is. These transactions are, however, inherently untrusted.

Time box

1/2 day

iamacook avatar Sep 16 '24 08:09 iamacook