diff --git a/Sources/BraveWallet/Panels/RequestContainerView.swift b/Sources/BraveWallet/Panels/RequestContainerView.swift index 9f5d83707d6..5f3c0d2cea7 100644 --- a/Sources/BraveWallet/Panels/RequestContainerView.swift +++ b/Sources/BraveWallet/Panels/RequestContainerView.swift @@ -28,9 +28,6 @@ struct RequestContainerView: View { keyringStore: keyringStore, onDismiss: onDismiss ) - .onDisappear { - cryptoStore.closeConfirmationStore() - } case .addSuggestedToken(let request): AddSuggestedTokenView( token: request.token, @@ -62,9 +59,6 @@ struct RequestContainerView: View { networkStore: cryptoStore.networkStore, onDismiss: onDismiss ) - .onDisappear { - cryptoStore.closeSignMessageRequestStore() - } case let .signMessageError(signMessageErrors): SignMessageErrorView( signMessageErrors: signMessageErrors, @@ -108,8 +102,11 @@ struct RequestContainerView: View { } } .navigationViewStyle(.stack) - .onAppear { - // TODO: Fetch pending requests + .onDisappear { + // `onDisappear` on individual views will trigger for navigation pushes. + // Close stores when navigation covers manual dismiss & onDismiss() cases. + cryptoStore.closeConfirmationStore() + cryptoStore.closeSignMessageRequestStore() } } }