From b90c18b79491655a04f33fa1a7fa8b139a4ff862 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Mon, 5 May 2025 10:48:48 +0530 Subject: [PATCH] Remove checking source type --- src/screens/SignTxEmbed.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/screens/SignTxEmbed.tsx b/src/screens/SignTxEmbed.tsx index d4eb4bc..dcd7c07 100644 --- a/src/screens/SignTxEmbed.tsx +++ b/src/screens/SignTxEmbed.tsx @@ -107,12 +107,8 @@ export const SignTxEmbed = () => { } catch (error: unknown) { console.error(`Error handling ${REQUEST_COSMOS_ACCOUNTS_DATA}:`, error); const errorMsg = error instanceof Error ? error.message : String(error); - // Check if source is a Window before sending message - if (source instanceof Window) { - sendMessage(source, COSMOS_ACCOUNTS_RESPONSE, { id, error: `Failed to get accounts: ${errorMsg}` }, origin); - } else { - console.error("Cannot send error message: source is not a Window"); - } + + sendMessage(source, COSMOS_ACCOUNTS_RESPONSE, { id, error: `Failed to get accounts: ${errorMsg}` }, origin); } }, [networksData]);