replicate import tokens flow through a special wootz://import/ flow
Opened this issue · 5 comments
https://metamask.zendesk.com/hc/en-us/articles/360015489031-How-to-display-tokens-in-MetaMask
this flow should be replicated through a special wootz:// url
https://user-images.githubusercontent.com/76883/215044145-77ec052b-f1f3-4f35-a448-0dcc770824d2.png and https://metamask.zendesk.com/hc/en-us/articles/360015489031-How-to-display-tokens-in-MetaMask in metamask, this is how we add new RPC.
in wootzapp, we are proposing different way. we will handle special kind of url - and this url will have all info.
e.g. wz://add-rpc?network-name=Shardeum%20Liberty&rpc-url=https%3A%2F%2Fliberty20.shardeum.org%2F&chain-id=8081¤cy-symbol=SHM&block-explorer-url=https%3A%2F%2Fexplorer-liberty20.shardeum.org%2F
when u click this url in wootzapp (or enter this url in address)...then a bottomsheet popup will come for adding this token/rpc. if user accept, this will get added. IMPORTANT: please check for duplicate. if same name, token, etc is already present...then show error. if same rpc url is used, then ask for double confirmation from user before adding. also save date of adding and show it. so that user knows when he added it.
user can go to "tokens/wallets" page and click button to "share network". if he click share network..then u will generate a url like above to be sharing. this will cause wootzapp usage to go high.
one functionality to be given in this token/wallets page - to reset nonce. this will help in case of errors (this kind of error - https://blog.chronologic.network/how-to-change-and-reset-your-nonce-in-metamask-f7ca52f480e5 and https://bitkan.com/learn/what-does-metamask-nonce-0-mean-how-to-reset-nonce-in-metamask-5387)
to eliminate fraud - add timestamp in front of the name of any token. this cant be edited.
so if u add a token named ETH, it will be saved in Hive as "202302120022-ETH". And this is how you will show it everywhere including profile page and sign.