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 ff384c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 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 @@ -168,6 +171,8 @@ export default function WalletModal() {
onClick={() => {
if (!isAcceptedTerm) {
mixpanelHandler(MIXPANEL_TYPE.WALLET_CONNECT_ACCEPT_TERM_CLICK)
} else {
dispatch(clearRecentConnectionMeta())
}
setIsAcceptedTerm(!isAcceptedTerm)
}}
Expand Down

0 comments on commit ff384c3

Please sign in to comment.