near / near-wallet

Web wallet for NEAR Protocol which stores keys in browser's localStorage
https://wallet.near.org
MIT License
220 stars 176 forks source link

Web redirects from apps does not set up the correct wallet and has no ability to switch the wallet #2431

Open alexauroradev opened 2 years ago

alexauroradev commented 2 years ago

Problem Web redirects from apps does not set up the correct wallet and has no ability to switch the wallet

Expected Behavior The redirect should set up the correct wallet AND user should be able to switch the signing wallet.

Steps to reproduce

  1. The user has multiple wallets, the last wallet used is _wallet1
  2. He logs in the app with _wallet1 (for example, https://ecosystem.pixeldapps.co/cryptoheroes)
  3. He switches in the wallet interface to the _wallet2
  4. During the interaction with the app and when it is requested to sign a transaction, the user is redirected to the wallet
  5. The wallet displays as an active wallet _wallet2 instead of _wallet1 with inability to switch the wallet

Here's the screenshot:

Screenshot 2022-02-01 at 15 49 47

The URL is the following: https://wallet.near.org/sign?transactions=CAAAAGFzMi5uZWFyAI1rFJM6rTTaPFh4BKcB%2Bw7DGa6KT4fiFa3IODd%2BaiJYVml%2B6g01AAAPAAAAcGl4ZWx0b2tlbi5uZWFySiTUi1PV9b7fCAsDShAAi8hurggsGIJTgrP0QDO40sgBAAAAAgsAAABjaF9idXlfaXRlbVAAAAB7InRva2VuX2lkIjoiMTIzNjk4Iiwib3duZXIiOiJyb3pib3IubmVhciIsImJ1eWVyIjoiYXMyLm5lYXIiLCJwcmljZSI6IjEwMDAwMDAifQBgt5hsiAAAAQAAAAAAAAAAAAAAAAAAAA%3D%3D&referrer=Pixelpets+Dapp%3A+Pixelpets+Dapp&callbackUrl=https%3A%2F%2Fecosystem.pixeldapps.co%2Fcallback%3Fpage%3Ditem_bought

paouvrard commented 2 years ago

+1 Some dapps like rainbowbridge expect the signer to be the connected account (wallet_1)

Patrick1904 commented 2 years ago

@esaminu is working on this here: https://github.com/near/near-wallet/issues/2402 :)