Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #8412: Dismiss NFT Discovery and NFT Removal popups when wallet i…
Browse files Browse the repository at this point in the history
…s auto-locked (#8413)

Dismiss NFT Discovery and NFT Removal popups when wallet is auto-locked
  • Loading branch information
StephenHeaps authored Nov 15, 2023
1 parent e1d45bd commit ef3636b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/BraveWallet/Crypto/NFT/NFTView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,15 @@ struct NFTView: View {
}
})
}
.onChange(of: keyringStore.isWalletLocked) { isLocked in
guard isLocked else { return }
if isShowingNFTDiscoveryAlert {
isShowingNFTDiscoveryAlert = false
}
if nftToBeRemoved != nil {
nftToBeRemoved = nil
}
}
.onAppear {
Task {
isNFTDiscoveryEnabled = await nftStore.isNFTDiscoveryEnabled()
Expand Down

0 comments on commit ef3636b

Please sign in to comment.