From f71dc6c6642ed99014644ff039be1d195f750695 Mon Sep 17 00:00:00 2001 From: Stephanie Egbuonu <100955511+stephanniegb@users.noreply.github.com> Date: Sun, 10 Nov 2024 14:26:04 +0100 Subject: [PATCH] Update openTokenboundwallet.ts --- .../tokenboundAccount/helpers/openTokenboundwallet.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/connectors/tokenboundAccount/helpers/openTokenboundwallet.ts b/src/connectors/tokenboundAccount/helpers/openTokenboundwallet.ts index 6a4aff8..4380ede 100644 --- a/src/connectors/tokenboundAccount/helpers/openTokenboundwallet.ts +++ b/src/connectors/tokenboundAccount/helpers/openTokenboundwallet.ts @@ -65,7 +65,11 @@ export const openTokenboundModal = async ( "message", async (event: MessageEvent) => { if (event.origin != origin) return - const { address, parentWallet }: Options = event.data + const { address, parentWallet, action }: Options = + event.data + if (action === "closeConnectKit") { + hideModal(modal) + } if (!parentWallet || !address) return const wallet_id = parentWallet.toLowerCase() const globalObject: Record = globalThis