diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-09-22 02:12:04 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-09-22 02:12:04 +0800 |
commit | 14b9d16eced03026da051604091833b5d19ab01e (patch) | |
tree | dc7e4fabfcccc38562ffe596165f4641565d1a58 /app | |
parent | 418f01411e3c41505d2011767e571af9401c3a2d (diff) | |
download | tangerine-wallet-browser-14b9d16eced03026da051604091833b5d19ab01e.tar tangerine-wallet-browser-14b9d16eced03026da051604091833b5d19ab01e.tar.gz tangerine-wallet-browser-14b9d16eced03026da051604091833b5d19ab01e.tar.bz2 tangerine-wallet-browser-14b9d16eced03026da051604091833b5d19ab01e.tar.lz tangerine-wallet-browser-14b9d16eced03026da051604091833b5d19ab01e.tar.xz tangerine-wallet-browser-14b9d16eced03026da051604091833b5d19ab01e.tar.zst tangerine-wallet-browser-14b9d16eced03026da051604091833b5d19ab01e.zip |
platforms: put context for extension in platform extension class
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/background.js | 1 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 2 | ||||
-rw-r--r-- | app/scripts/platforms/extension.js | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index a271db263..1b96d68b5 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -20,7 +20,6 @@ window.log = log log.setDefaultLevel(METAMASK_DEBUG ? 'debug' : 'warn') const platform = new ExtensionPlatform() -platform.context = 'extension' const notificationManager = new NotificationManager() global.METAMASK_NOTIFIER = notificationManager diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 3a2f3878c..4d149545a 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -196,7 +196,7 @@ module.exports = class MetamaskController extends EventEmitter { }, // rpc data source rpcUrl: this.networkController.getCurrentRpcAddress(), - originHttpHeaderKey: this.platform.context === 'extension' ? 'X-Metamask-Origin' : undefined, + originHttpHeaderKey: this.platform.isExtension ? 'X-Metamask-Origin' : undefined, // account mgmt getAccounts: (cb) => { const isUnlocked = this.keyringController.memStore.getState().isUnlocked diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js index 00c2aa275..d97138207 100644 --- a/app/scripts/platforms/extension.js +++ b/app/scripts/platforms/extension.js @@ -5,6 +5,9 @@ class ExtensionPlatform { // // Public // + get isExtension () { + return true + } reload () { extension.runtime.reload() |