Skip to content

Commit

Permalink
No longer always redirect on wallet change
Browse files Browse the repository at this point in the history
  • Loading branch information
Redm4x committed Dec 22, 2023
1 parent e852f1a commit ee1e716
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deploy-web/src/context/WalletProvider/WalletProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ export const WalletProvider = ({ children }) => {
});
}

// Redirect to homepage when changing wallet
// Update balances on wallet address change
useEffect(() => {
if (walletAddress) {
router.push(UrlService.home());

// Redirect to deployment list if on deployment detail page
if (router.pathname.startsWith("/deployments/")) {
router.push(UrlService.deploymentList());
}
loadWallet();
}
}, [walletAddress]);
Expand Down

0 comments on commit ee1e716

Please sign in to comment.