TP-Lab / tp-js-sdk

TokenPocket JS API for Dapp of ETH, IOST, TRON, COSMOS, SOLANA, EOS etc. (mobile only)
200 stars 61 forks source link

Allow user choose wich wallet to activate Tokenpocket or Metamask #40

Open moijia opened 1 year ago

moijia commented 1 year ago

https://www.sushi.com/swap sushi_connect

Once tockenpocket extension installed it disable Metamask Wallet

chendatony31 commented 1 year ago

There is a setting for active TokenPocket or Metamask.

image
octavioamu commented 1 year ago

If I have tokenpoket extension enable then metamask will not work as tokenpocket is taking over the provider, this approach should be changed as will force the users to keep this extension disabled

This can be easy tested with the 2 wallets extension installed and enabled on https://www.sushi.com/swap

chendatony31 commented 1 year ago

Hi, @octavioamu @moijia, here is some update about this:

  1. With the TokenPocket extension, you can access window.tokenpocket.ethereum as the provider (mobile wallet will support in the next release).

  2. We have supported EIP-6963 to solve the multi providers's problems (TokenPocket extension and mobile wallets).