safe-react icon indicating copy to clipboard operation
safe-react copied to clipboard

Improve ordering of contract interaction labels

Open iamacook opened this issue 2 years ago • 2 comments

Description

The transaction service has issues returning the correct decoded contract labels:

The "dataDecoded" for the transaction has the parameter 0 "receiver" and parameter 1 "tokenAddress", however in the contract code the parameter 0 is "_tokenAddr" and parameter 1 is "_to". i.e. the order of labels is switched.

We can likely improve this on the frontend by referencing the address used to request the decoded data.

Expected result

Receiver and token display correctly.

Obtained result

Receiver and token are inverted.

Screenshots

image image

Links

Related issues

  • https://github.com/gnosis/safe-transaction-service/issues/493
  • https://github.com/gnosis/safe-transaction-service/issues/638

iamacook avatar Apr 11 '22 09:04 iamacook

@iamacook shouldn't this be tackled on the backend?

katspaugh avatar Apr 28 '22 07:04 katspaugh

@iamacook shouldn't this be tackled on the backend?

Ideally, yes, but it is not on their list of things to do as it would have an adverse effect on performance. This is a suggested workaround as I don't think it will be implemented on the backend.

iamacook avatar Apr 28 '22 08:04 iamacook

We no longer include "Contract Interaction" in web-core. As such, I'm closing this.

iamacook avatar Sep 28 '22 07:09 iamacook