Skip to content

Commit

Permalink
fix: reset address on wallet disconnect
Browse files Browse the repository at this point in the history
Ensure the user's address is cleared when the wallet is disconnected to prevent stale data.

Changes:
- **modal.tsx**: Updated handleDisconnectWallet function to reset the address.
  • Loading branch information
cswni committed Dec 5, 2024
1 parent 257a40d commit 9dbedd6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/loginModal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const LoginModal: React.FC<LoginModalProps> = ({ open, onClose }) => {
const handleDisconnectWallet = async () => {
if (sessionData?.authenticated) await logoutExecute()
setIsConnected(false)
setAddress("")
disconnect();
setView('wallet');
};
Expand Down

0 comments on commit 9dbedd6

Please sign in to comment.