From dcea67bc0e6bca759f07871425a2d45b8db5b6db Mon Sep 17 00:00:00 2001 From: Ross Bulat Date: Thu, 10 Oct 2024 15:13:17 +0700 Subject: [PATCH] feat(ux): auto close wallet connect modal after approval --- src/contexts/WalletConnect/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/contexts/WalletConnect/index.tsx b/src/contexts/WalletConnect/index.tsx index 10ca78e3..1400d88d 100644 --- a/src/contexts/WalletConnect/index.tsx +++ b/src/contexts/WalletConnect/index.tsx @@ -221,6 +221,9 @@ export const WalletConnectProvider = ({ // Get session from approval. const newWcSession = await wcMeta?.approval(); + // Close modal on approval completion. + wcModal.current!.closeModal(); + // Update session data in provider. if (wcProvider.current) { wcProvider.current.session = newWcSession;