Skip to content

Commit

Permalink
Fix wallets not loading after returning from "Transaction history" page
Browse files Browse the repository at this point in the history
Fixes #2622
  • Loading branch information
kev1n-peters committed Sep 17, 2024
1 parent c28581a commit c81b0a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions wormhole-connect/src/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Terms from './views/Terms';
import TxSearch from './views/TxSearch';
import { setRoute } from './store/router';
import { clearWallets } from './store/wallet';
import { clearPorticoBridge } from 'store/porticoBridge';
import { useExternalSearch } from 'hooks/useExternalSearch';

import BridgeV2 from 'views/v2/Bridge';
Expand Down Expand Up @@ -80,9 +79,9 @@ function AppRouter(props: Props) {
config.whLegacy.registerProviders(); // reset providers that may have been set during transfer
}
// reset transfer state on leave
if (route === bridgeRoute && prevRoute !== bridgeRoute) {
const isEnteringBridge = route === bridgeRoute && prevRoute !== bridgeRoute;
if (isEnteringBridge && prevRoute !== 'history') {
dispatch(clearTransfer());
dispatch(clearPorticoBridge());
}
}, [route, prevRoute, dispatch]);

Expand Down

0 comments on commit c81b0a4

Please sign in to comment.