Skip to content

Commit

Permalink
fix: clear recent wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv committed Apr 22, 2024
1 parent 6e2f38f commit 2607501
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Header/web3/WalletModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -167,6 +170,7 @@ export default function WalletModal() {
<TermAndCondition
onClick={() => {
if (!isAcceptedTerm) {
dispatch(clearRecentConnectionMeta())
mixpanelHandler(MIXPANEL_TYPE.WALLET_CONNECT_ACCEPT_TERM_CLICK)
}
setIsAcceptedTerm(!isAcceptedTerm)
Expand Down

0 comments on commit 2607501

Please sign in to comment.