Skip to content

Fallback to FullTokenList in TransactionParser #11351

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

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

Douglashdaniel
Copy link
Contributor

Description

Fallback to FullTokenList in TransactionParser

Before the findToken method in the TransactionParser hook would only do a find from the users visibleTokens causing a bug where a tokens symbol would not appear in the Approve Spend panel if Approving Token was not added by the user.

It will now fallback to the fullTokenList if no token is found.

note: (This is not a full fix for this issue, for if the token also does not exist in our ercTokenRegistry the same bug will occur. Once we have an API ready to get token information from etherscan we will be able to make this more full proof.)

Resolves brave/brave-browser#19556

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Screen.Recording.2021-11-30.at.11.57.28.AM.mov

@Douglashdaniel Douglashdaniel self-assigned this Nov 30, 2021
@Douglashdaniel
Copy link
Contributor Author

Failed SonarCloud checks - it's due to code duplication in unit tests.

@Douglashdaniel Douglashdaniel force-pushed the fallback-to-full-token-list branch from ccf5e98 to 6087f33 Compare December 1, 2021 01:54
@Douglashdaniel Douglashdaniel force-pushed the fallback-to-full-token-list branch from 6087f33 to 53ceed7 Compare December 1, 2021 14:54
@Douglashdaniel Douglashdaniel requested a review from onyb December 1, 2021 16:35
@Douglashdaniel Douglashdaniel force-pushed the fallback-to-full-token-list branch from 53ceed7 to 21028b4 Compare December 1, 2021 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Token name is missing from approve spend limit screen on testnet
2 participants