oasisprotocol / wallet

Official non-custodial wallet for the Oasis Network.
https://wallet.oasis.io
Apache License 2.0
110 stars 45 forks source link

Fix useRouteRedirects redirecting to active wallet #823

Open lukaw3d opened 2 years ago

lukaw3d commented 2 years ago

useRouteRedirects

This is tough. It was an effect in saga before (https://github.com/oasisprotocol/oasis-wallet-web/blob/5cebb40/src/app/state/wallet/saga.ts#L150) but saga now runs in background page.

One benefit of this is: when you open a popup with stored state, it redirects to your wallet. One issue is: it always redirects. Even if you have chrome-extension://jplembhokmkioddbchbohdfkmjdmepbb/popup.html#/create-wallet open as a tab, and reload.

Use cases:

_Originally posted by @lukaw3d in https://github.com/oasisprotocol/oasis-wallet-web/pull/787#discussion_r843384857_

lukaw3d commented 2 years ago

This will be more annoying after https://github.com/oasisprotocol/oasis-wallet-web/pull/975

lukaw3d commented 1 year ago

Another issue to check after fixing this: