add context to platform to not have X-Metamask-Origin in mascara

feature/default_network_editable
frankiebee 7 years ago
parent 29dd81d029
commit bfd75107f1
  1. 1
      app/scripts/background.js
  2. 2
      app/scripts/metamask-controller.js

@ -20,6 +20,7 @@ window.log = log
log.setDefaultLevel(METAMASK_DEBUG ? 'debug' : 'warn') log.setDefaultLevel(METAMASK_DEBUG ? 'debug' : 'warn')
const platform = new ExtensionPlatform() const platform = new ExtensionPlatform()
platform.context = 'extension'
const notificationManager = new NotificationManager() const notificationManager = new NotificationManager()
global.METAMASK_NOTIFIER = notificationManager global.METAMASK_NOTIFIER = notificationManager

@ -196,7 +196,7 @@ module.exports = class MetamaskController extends EventEmitter {
}, },
// rpc data source // rpc data source
rpcUrl: this.networkController.getCurrentRpcAddress(), rpcUrl: this.networkController.getCurrentRpcAddress(),
originHttpHeaderKey: 'X-Metamask-Origin', originHttpHeaderKey: this.platform.context === 'extension' ? 'X-Metamask-Origin' : undefined,
// account mgmt // account mgmt
getAccounts: (cb) => { getAccounts: (cb) => {
const isUnlocked = this.keyringController.memStore.getState().isUnlocked const isUnlocked = this.keyringController.memStore.getState().isUnlocked

Loading…
Cancel
Save