wootzapp / wootz-browser

Chromium fork for people to earn through data labeling.
GNU Affero General Public License v3.0
56 stars 34 forks source link

replicate import tokens flow through a special wootz://import/ flow #36

Open sandys opened 1 year ago

sandys commented 1 year ago

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

sandys commented 1 year ago

image

sandys commented 1 year ago

https://www.youtube.com/watch?v=ouJMbGntJvo

sandys commented 1 year ago

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&currency-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)

sandys commented 1 year ago

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.

sandys commented 1 year ago

https://docs.filecoin.io/developers/smart-contracts/how-tos/add-to-metamask/