safe-client-gateway
safe-client-gateway copied to clipboard
Investigate refactoring use of `DataDecodedParamHelper`
Description
When mapping ERC-20/721 transfers, we extract the values of the sender
, recipient
, etc. from the decodedData
of a given transaction.
Each transaction that transfers tokens also has a transfers
array that seemingly contains all the information of the above and using that would simply a lot of the above.
Requirements
As the mapping is only of ERC-20/721 token, the transaction types are that of MultisigTransaction | ModuleTransaction
:
- Investigate if both transaction types always return
transfers
array. - If so, add
transfers
array to validation schemas. - Replace
DataDecodedParamHelper['getFromParam' | 'getToParam' | 'getValueParam']
withtransfers
value(s). - Update associated tests.
Additional information
This transfers
array does not exist in the MultisigTransaction | ModuleTransaction
types despite being returned by the Transaction Service. (As the above was implemented early in the project, it may not have existed then.)