File tree Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Original file line number Diff line number Diff line change 1
1
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' ;
7
2
8
3
const injectScript = ( ) => {
9
4
const script = document . createElement ( 'script' ) ;
@@ -16,20 +11,8 @@ const injectScript = () => {
16
11
} ;
17
12
18
13
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
33
16
}
34
17
35
18
if ( await shouldInject ( ) ) {
You can’t perform that action at this time.
0 commit comments