From 05d5aeba3d9816687b8322b30010d8f4f1fdfb67 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Wed, 25 Oct 2023 12:19:49 +0200 Subject: [PATCH] Fix: clear proposal if rejection fails --- src/components/walletconnect/WcSessionMananger/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/walletconnect/WcSessionMananger/index.tsx b/src/components/walletconnect/WcSessionMananger/index.tsx index d8c93e2ec7..676921f7e7 100644 --- a/src/components/walletconnect/WcSessionMananger/index.tsx +++ b/src/components/walletconnect/WcSessionMananger/index.tsx @@ -55,9 +55,9 @@ const WcSessionManager = ({ sessions, uri }: WcSessionManagerProps) => { await walletConnect.rejectSession(proposal) } catch (e) { setError(asError(e)) - return } + // Always clear the proposal, even if the rejection fails setProposal(undefined) }, [proposal, walletConnect, setError])