From 6ab92406aa5c829df13df5394fd0acf72d443cbf Mon Sep 17 00:00:00 2001 From: katspaugh Date: Sat, 28 Oct 2023 09:19:51 +0200 Subject: [PATCH] Fix: no close warning when resetting txFlow --- src/components/tx-flow/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/tx-flow/index.tsx b/src/components/tx-flow/index.tsx index 129e0ac9af..ba3abfa0af 100644 --- a/src/components/tx-flow/index.tsx +++ b/src/components/tx-flow/index.tsx @@ -49,7 +49,7 @@ export const TxModalProvider = ({ children }: { children: ReactNode }): ReactEle if (prev === newTxFlow) return prev // If a new flow is triggered, close the current one - if (prev && newTxFlow?.type !== SuccessScreen) { + if (prev && newTxFlow && newTxFlow.type !== SuccessScreen) { if (shouldWarn.current && !confirmClose()) { return prev }