Skip to content

Conversation

@adonesky1
Copy link
Contributor

Fixes: #8252

Explanation: Adds custom icon for a token to the send token flow in the asset-dropdown

Manual testing steps:

  • Add a custom token via the methods outlined in EIP-747
  • Attempt to send some of this token
  • Confirm that the custom icon that was supplied when first importing the token is visible beside token name(rather than generic identicon).

Here is a method that can be called in the browser console to initialize the addition of a token with a custom icon into MetaMask:

ethereum.request({ method: 'wallet_watchAsset', params: { type: 'ERC20', options: { address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155', symbol: 'FOO', decimals: 18, image: 'https://w7.pngwing.com/pngs/1018/815/png-transparent-luminiferous-aether-symbol-diethyl-ether-symbol-miscellaneous-purple-chemical-element.png', }, }, }) .then((success) => { if (success) { console.log('FOO successfully added to wallet!') } else { throw new Error('Something went wrong.') } }) .catch(console.error)

@adonesky1 adonesky1 requested review from danjm and rekmarks April 27, 2021 21:55
@adonesky1 adonesky1 requested a review from a team as a code owner April 27, 2021 21:55
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

LGTM

@adonesky1 adonesky1 merged commit b6d8291 into MetaMask:develop Apr 28, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send token screen does not use token icons from custom-added assets.

2 participants