Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve front end methods for identifying transaction type #6380

Closed
danjm opened this issue Apr 1, 2019 · 1 comment · Fixed by #6567
Closed

Improve front end methods for identifying transaction type #6380

danjm opened this issue Apr 1, 2019 · 1 comment · Fixed by #6567
Assignees
Labels
area-background Issues relating to the extension background process. area-transactions area-UI Relating to the user interface. type-enhancement

Comments

@danjm
Copy link
Contributor

danjm commented Apr 1, 2019

As demonstrated by the bugs we fixed with 6.3.1, our approach to determining transaction type, and therefore confirmation screen to show, is somewhat fragile.

Improvements were made with 6.3.1, but I wonder if we can go a step further, and identify a transaction type at the time the transaction is created. This could be saved with txData, and then we have an authoritative answer with the transaction at all times.

I believe there will always be 4 types of transactions:

  • simple sends
  • contract deployments
  • contract method calls on contracts for which we know the abi within the metamask codebase
  • contract method calls on contracts for which the abi is not known

I believe we can identify all cases without having to rely on a network request. While a network request will be needed to get UI relevant data in the last case (i.e. contract method name), it is not needed to successfully render the right contract on the right confirm screen.

I believe the assigning of transaction type to transaction data can be handle without too much difficulty by the transaction controller.

@danjm danjm added type-enhancement area-background Issues relating to the extension background process. area-UI Relating to the user interface. area-transactions labels Apr 1, 2019
@bdresser
Copy link
Contributor

relates to MetaMask/Design#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-background Issues relating to the extension background process. area-transactions area-UI Relating to the user interface. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@bdresser @danjm and others