From 89a4d4f71ff1370f00b002d83acf050ca74dc6ae Mon Sep 17 00:00:00 2001 From: vetalcore Date: Thu, 6 Feb 2025 12:16:25 +0200 Subject: [PATCH] fix: [lw-12251] do not inject cip30 api --- src/pages/Content/index.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/pages/Content/index.js b/src/pages/Content/index.js index 30acdca0..c93cc107 100644 --- a/src/pages/Content/index.js +++ b/src/pages/Content/index.js @@ -1,9 +1,4 @@ import { Messaging } from '../../api/messaging'; -import { storage } from 'webextension-polyfill'; -import { - MIGRATION_KEY, - MigrationState, -} from '../../api/migration-tool/migrator/migration-state.data'; const injectScript = () => { const script = document.createElement('script'); @@ -16,20 +11,8 @@ const injectScript = () => { }; async function shouldInject() { - const { laceMigration } = (await storage.local.get([MIGRATION_KEY])) || { - laceMigration: undefined, - }; - - // Prevent injection into window.cardano namespace if migration has been completed - // or if the user has dismissed because they are having issues migrating (setting migration state back to 'none') - if (laceMigration === MigrationState.Completed) return false; - const documentElement = document.documentElement.nodeName; - const docElemCheck = documentElement - ? documentElement.toLowerCase() === 'html' - : true; - const { docType } = window.document; - const docTypeCheck = docType ? docType.name === 'html' : true; - return docElemCheck && docTypeCheck; + // do not inject since the migration is not dismissible anymore + return false } if (await shouldInject()) {