Registering Tokens with Users
When a user opens their OneKey Browser Extension, they are shown a variety of assets, including tokens. By default, OneKey Browser Extension auto-detects some major popular tokens and auto-displays them, but for most tokens, the user will need to add the token themselves.
While this is possible using our UI with the Add Token
button, that process can be cumbersome, and involves the user interacting with contract addresses, and is very error prone.
You can greatly improve the security and experience of users adding your token to their OneKey Browser Extension by taking advantage of the wallet_watchAsset
API as defined in EIP-747.
Example
If you'd like to integrate suggesting a token into your own web app, you can follow this code snippet to implement it:
Last updated