From c6d8af4f4cbc9b44acf47c8743484f0789f04def Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Thu, 25 Apr 2024 14:41:40 -0500 Subject: [PATCH] move window message listener to index.html --- frontend/index.html | 10 ++++++++++ frontend/src/main.jsx | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index e2b4d1d..af04817 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -8,6 +8,16 @@
+ diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx index 6fcecbf..3ddfdd2 100644 --- a/frontend/src/main.jsx +++ b/frontend/src/main.jsx @@ -14,16 +14,6 @@ import Widget from './Widget'; window.widgetApiPromise = WidgetApiImpl.create({}); -console.log('adding window message event listener'); - -window.addEventListener( - 'message', - (event) => { - if (event.data?.target?.startsWith('metamask')) return; - console.log('window message', event); - }, -); - const router = createBrowserRouter([ { path: '/',