Skip to content

Commit 60bab89

Browse files
authored
Merge pull request #972 from input-output-hk/fix/lw-12251-do-not-inject-cip30
fix: [lw-12251] do not inject cip30 api
2 parents 24ea330 + 89a4d4f commit 60bab89

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

src/pages/Content/index.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
import { Messaging } from '../../api/messaging';
2-
import { storage } from 'webextension-polyfill';
3-
import {
4-
MIGRATION_KEY,
5-
MigrationState,
6-
} from '../../api/migration-tool/migrator/migration-state.data';
72

83
const injectScript = () => {
94
const script = document.createElement('script');
@@ -16,20 +11,8 @@ const injectScript = () => {
1611
};
1712

1813
async function shouldInject() {
19-
const { laceMigration } = (await storage.local.get([MIGRATION_KEY])) || {
20-
laceMigration: undefined,
21-
};
22-
23-
// Prevent injection into window.cardano namespace if migration has been completed
24-
// or if the user has dismissed because they are having issues migrating (setting migration state back to 'none')
25-
if (laceMigration === MigrationState.Completed) return false;
26-
const documentElement = document.documentElement.nodeName;
27-
const docElemCheck = documentElement
28-
? documentElement.toLowerCase() === 'html'
29-
: true;
30-
const { docType } = window.document;
31-
const docTypeCheck = docType ? docType.name === 'html' : true;
32-
return docElemCheck && docTypeCheck;
14+
// do not inject since the migration is not dismissible anymore
15+
return false
3316
}
3417

3518
if (await shouldInject()) {

0 commit comments

Comments
 (0)