diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/config.js | 3 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/app/scripts/config.js b/app/scripts/config.js index 5f6ffd936..297a3a7a0 100644 --- a/app/scripts/config.js +++ b/app/scripts/config.js @@ -2,6 +2,7 @@ const MAINET_RPC_URL = 'https://mainnet.infura.io/' const TESTNET_RPC_URL = 'https://morden.infura.io/' const DEFAULT_RPC_URL = TESTNET_RPC_URL const CLASSIC_RPC_URL = 'https://mainnet-nf.infura.io/' +const DEVELOPMENT_MODE = true module.exports = { network: { @@ -10,5 +11,5 @@ module.exports = { testnet: TESTNET_RPC_URL, classic: CLASSIC_RPC_URL, }, + developmentMode: DEVELOPMENT_MODE } - diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index dd43ac2fc..a5c167223 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -7,6 +7,7 @@ const HostStore = require('./lib/remote-store.js').HostStore const Web3 = require('web3') const ConfigManager = require('./lib/config-manager') const extension = require('./lib/extension') +const developmentMode = require('./config').developmentMode module.exports = class MetamaskController { @@ -93,7 +94,7 @@ module.exports = class MetamaskController { function logger (err, request, response) { if (err) return console.error(err) - if (!request.isMetamaskInternal) { + if (developmentMode && !request.isMetamaskInternal) { console.log(`RPC (${originDomain}):`, request, '->', response) if (response.error) { console.error('Error in RPC response:\n', response.error) @@ -218,7 +219,9 @@ module.exports = class MetamaskController { // Log blocks processBlock (block) { - console.log(`BLOCK CHANGED: #${block.number.toString('hex')} 0x${block.hash.toString('hex')}`) + if (developmentMode) { + console.log(`BLOCK CHANGED: #${block.number.toString('hex')} 0x${block.hash.toString('hex')}`) + } this.verifyNetwork() } |