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

Create utility method for determining if a transaction is sending base asset for current network #13422

Closed
brad-decker opened this issue Jan 27, 2022 · 0 comments

Comments

@brad-decker
Copy link
Contributor

brad-decker commented Jan 27, 2022

Description

in #13420 and #13423 it will need to be known if the transaction in question is dealing in the base asset for the network. This is easy to determine by examining txParams, and the code for doing so exists in the transaction controller as _determineTransactionType. If the result of that method is SIMPLE_SEND then we know we are dealing with the base asset.

Requirements/Suggested Implementation details

  1. Extract the _determineTransactionType code to a helper method that can be used in either the IncomingTransactionController or TransactionController. Do not put this in shared as I believe it shouldn't be used on frontend.
  2. The new function takes a txMeta object as input.
  3. Function will check if the type parameter is already set, if it is it'll check if its a SIMPLE_SEND and return boolean based on that
  4. If not it'll call the new helper method with txMeta.txParams to get the type prior to checking it against SIMPLE_SEND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants