aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-08-12 10:44:59 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-08-12 10:44:59 +0800
commitb1f68ec9cd2549a7b52272407f1543ae0b1d9326 (patch)
treeb497e51e3adf3f2a6cb54d243bf3cd1af6892f80 /app/scripts/metamask-controller.js
parent1e54a1b5e84988038039ad30648d14ad263f60e3 (diff)
downloadtangerine-wallet-browser-b1f68ec9cd2549a7b52272407f1543ae0b1d9326.tar
tangerine-wallet-browser-b1f68ec9cd2549a7b52272407f1543ae0b1d9326.tar.gz
tangerine-wallet-browser-b1f68ec9cd2549a7b52272407f1543ae0b1d9326.tar.bz2
tangerine-wallet-browser-b1f68ec9cd2549a7b52272407f1543ae0b1d9326.tar.lz
tangerine-wallet-browser-b1f68ec9cd2549a7b52272407f1543ae0b1d9326.tar.xz
tangerine-wallet-browser-b1f68ec9cd2549a7b52272407f1543ae0b1d9326.tar.zst
tangerine-wallet-browser-b1f68ec9cd2549a7b52272407f1543ae0b1d9326.zip
Add global var for background.
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index e7e96a472..2c141a402 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -94,7 +94,9 @@ module.exports = class MetamaskController {
function logger (err, request, response) {
if (err) return console.error(err)
if (!request.isMetamaskInternal) {
- console.log(`RPC (${originDomain}):`, request, '->', response)
+ if (global.METAMASK_DEBUG) {
+ console.log(`RPC (${originDomain}):`, request, '->', response)
+ }
if (response.error) {
console.error('Error in RPC response:\n', response.error)
}
@@ -218,7 +220,9 @@ module.exports = class MetamaskController {
// Log blocks
processBlock (block) {
- console.log(`BLOCK CHANGED: #${block.number.toString('hex')} 0x${block.hash.toString('hex')}`)
+ if (global.METAMASK_DEBUG) {
+ console.log(`BLOCK CHANGED: #${block.number.toString('hex')} 0x${block.hash.toString('hex')}`)
+ }
this.verifyNetwork()
}