|
|
@ -53,9 +53,17 @@ var __define |
|
|
|
|
|
|
|
|
|
|
|
function cleanContextForImports () { |
|
|
|
function cleanContextForImports () { |
|
|
|
__define = global.define |
|
|
|
__define = global.define |
|
|
|
|
|
|
|
try { |
|
|
|
delete global.define |
|
|
|
delete global.define |
|
|
|
|
|
|
|
} catch (_) { |
|
|
|
|
|
|
|
console.warn('MetaMask - global.define could not be deleted.') |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function restoreContextAfterImports () { |
|
|
|
function restoreContextAfterImports () { |
|
|
|
|
|
|
|
try { |
|
|
|
global.define = __define |
|
|
|
global.define = __define |
|
|
|
|
|
|
|
} catch { |
|
|
|
|
|
|
|
console.warn('MetaMask - global.define could not be overwritten.') |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|