Import tokens to trade via contract address
Currently users can only trade assets that are in the app's asset list. As a user, I want to be able to trade any asset by pasting in the contract address. 0x's API supports this by passing through the token's contract address (see matcha.xyz example with 0x900dB999074d9277c5DA2A43F252D74366230DA0).
- "Search" copy in the field in the trade modal is updated to "Search by name or contract address"
- When a user pastes a contract address in the search field, they can see the corresponding asset's Symbol, Name, auto-generated icon, and their current balance populated
*
*use existing styles so this matches current UI in trade modal
- If a user clicks the imported asset, they see the Imported Token Alert
Copy: "⚠️ Unknown Token Alert
⚠️ Unknown Token Alert
This token was detected in your wallet, but is not on the CoinGecko list. Therefore, we cannot verify its legitimacy.
Anyone can create a token and transfer it to your wallet. Before interacting with any token you are not expecting, be sure to research it. ShapeShift makes no representation about the quality, nature, or legal categorization of any tokens. By importing this token, you are doing so at your own risk.
BTN: (IMPORT TOKEN)
Text link: Read our terms of service

-
If a user clicks 'I Understand,' the asset is selected and the user can proceed with trading the asset; they can see the asset's name, symbol, and auto-generated icon displayed throughout the trade flow as if it was an asset in the app's token list
-
Users can click a back arrow to cancel the token import
I can take this up after #959 as I have a feeling people might import tokens that are not very popular and don't have icons
@willyogo do you know where we can source this missing asset data that isn't coingecko, coincap, or yearn?
@0xdef1cafe now that the app will be able to gracefully handle assets with no pricing data, I believe all of the data we must have (token symbol, name, # of decimal) can be sourced from the contract. The icon will be auto-generated using the token symbol. Is there any data you think we must have?
ah i see, if it's this rudimentary, just symbol/name/decimals, according to @theoboldfrazier we can get this via web3 utils
engineering note - we need to refetch the portfolio after importing a custom asset to pick up balances etc
@DiggyDiggy2 @reallybeard @SS-FOX-McCloud - @mrnerdhair has some valid points that we should provide some sort of indication
- when importing custom tokens, and
- in a few places in the UI, to denote that a user is dealing with a custom token
ah i see, if it's this rudimentary, just symbol/name/decimals, according to @theoboldfrazier we can get this via web3 utils
engineering note - we need to refetch the portfolio after importing a custom asset to pick up balances etc
@DiggyDiggy2 @reallybeard @SS-FOX-McCloud - @mrnerdhair has some valid points that we should provide some sort of indication
- when importing custom tokens, and
- in a few places in the UI, to denote that a user is dealing with a custom token
sweet! re: providing indications,
- we've got this mockup for warning a user in the trade modal when they import a token
- we could consider adding an info/warning icon to any token's icon throughout the UI if a token is not on the CoinGecko list (ideally with a tooltip on hover with the same copy displayed when importing a token, but instead of "trade" we should say "interact with"), but I think that is a separate issue. metamask and other wallets don't show any kind of warning after a token has been imported, but as we move to automatically displaying all tokens in a users' wallet, I do like the idea of showing a non-invasive warning for tokens outside of the "approved" asset list.
ah i see, if it's this rudimentary, just symbol/name/decimals, according to @theoboldfrazier we can get this via web3 utils engineering note - we need to refetch the portfolio after importing a custom asset to pick up balances etc @DiggyDiggy2 @reallybeard @SS-FOX-McCloud - @mrnerdhair has some valid points that we should provide some sort of indication
- when importing custom tokens, and
- in a few places in the UI, to denote that a user is dealing with a custom token
sweet! re: providing indications,
- we've got this mockup for warning a user in the trade modal when they import a token
![]()
- we could consider adding an info/warning icon to any token's icon throughout the UI if a token is not on the CoinGecko list (ideally with a tooltip on hover with the same copy displayed when importing a token, but instead of "trade" we should say "interact with"), but I think that is a separate issue. metamask and other wallets don't show any kind of warning after a token has been imported, but as we move to automatically displaying all tokens in a users' wallet, I do like the idea of showing a non-invasive warning for tokens outside of the "approved" asset list.
i like this justification and you're right, they only warn on import, we're super clear on import here in the mocks, and it's up to them after that. will remove needs product and we can architect this and get it going on engineerings side.
new AC alert:
- add a back button so users can cancel
Updated copy from product:
⚠️ Unknown Token Alert
This token was detected in your wallet, but is not on the CoinGecko list. Therefore, we cannot verify its legitimacy.
Anyone can create a token and transfer it to your wallet. Before interacting with any token you are not expecting, be sure to research it. ShapeShift makes no representation about the quality, nature, or legal categorization of any tokens. By importing this token, you are doing so at your own risk.
BTN: (IMPORT TOKEN)
@0xdef1cafe to take a look at a spike for this.
closing as low priority