From 260750102138757ef2154cf007c6582ab560985d Mon Sep 17 00:00:00 2001 From: viet-nv Date: Mon, 22 Apr 2024 13:58:01 +0700 Subject: [PATCH] fix: clear recent wallet --- src/components/Header/web3/WalletModal/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Header/web3/WalletModal/index.tsx b/src/components/Header/web3/WalletModal/index.tsx index cdedbccaf0..f4ca3b46f1 100644 --- a/src/components/Header/web3/WalletModal/index.tsx +++ b/src/components/Header/web3/WalletModal/index.tsx @@ -24,6 +24,8 @@ import { useOpenNetworkModal, useWalletModalToggle, } from 'state/application/hooks' +import { useAppDispatch } from 'state/hooks' +import { clearRecentConnectionMeta } from 'state/user/actions' import { useIsAcceptedTerm } from 'state/user/hooks' import { ExternalLink } from 'theme' @@ -109,6 +111,7 @@ export default function WalletModal() { const { activationState, cancelActivation } = useActivationState() const theme = useTheme() + const dispatch = useAppDispatch() const walletModalOpen = useModalOpen(ApplicationModal.WALLET) const toggleWalletModal = useWalletModalToggle() @@ -167,6 +170,7 @@ export default function WalletModal() { { if (!isAcceptedTerm) { + dispatch(clearRecentConnectionMeta()) mixpanelHandler(MIXPANEL_TYPE.WALLET_CONNECT_ACCEPT_TERM_CLICK) } setIsAcceptedTerm(!isAcceptedTerm)