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

Support wallet_watchAsset #11518

Merged
merged 6 commits into from
Dec 10, 2021
Merged

Support wallet_watchAsset #11518

merged 6 commits into from
Dec 10, 2021

Conversation

yrliou
Copy link
Member

@yrliou yrliou commented Dec 8, 2021

Resolves brave/brave-browser#17878

Image parameter is not supported yet because we currently don't support getting a logo from a remote URL, currently it will still use the placeholder icon if a remote URL is passed. (brave/brave-browser#20000)

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:

Test Plan:

  1. Visit https://www.coingecko.com/en/coins/railgun and click on the fox icon to add suggest token

add_to_metamask

  1. Prompt should show up for adding suggest token (will be asking to unlock first if wallet is locked)

add_suggest_token

  1. Cancel the request.
  2. Open a new tab and visit brave://wallet/crypto/portfolio should not see the new token.
  3. Do step 1 again and accept the request this time.
  4. Go to brave://wallet/crypto/portfolio should see it being listed in visible assets. (Existing page will need to fresh to see the change)

assets

  1. Visit https://www.coingecko.com/en/coins/tether and click on the fox icon to add suggest token
  2. Prompt should show up with correct logo.

usdt

  1. Accept the request.
  2. Open a new tab and visit brave://wallet/crypto/portfolio should see tether in the asset list.

Screen Shot 2021-12-08 at 5 33 17 PM

@yrliou yrliou changed the base branch from permissions to master December 9, 2021 17:19
@yrliou yrliou changed the base branch from master to permissions December 9, 2021 17:23
@yrliou yrliou changed the base branch from permissions to master December 9, 2021 17:23
@yrliou yrliou force-pushed the watch_assets branch 2 times, most recently from f523999 to 035310c Compare December 10, 2021 00:06
Copy link
Contributor

@Douglashdaniel Douglashdaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Front-end looks good!

@yrliou
Copy link
Member Author

yrliou commented Dec 10, 2021

linux failed at s3-upload.

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.

Handle wallet_watchAsset method to add suggested tokens
3 participants