Skip to content

Commit

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

Dismiss NFT Discovery and NFT Removal popups when wallet is auto-locked
  • Loading branch information
StephenHeaps authored Nov 15, 2023
1 parent ed2864d commit 6253223
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 6253223

Please sign in to comment.