aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-04-17 06:16:45 +0800
committerGitHub <noreply@github.com>2018-04-17 06:16:45 +0800
commit26d2f5cd0ebe8a0b248253b1f932457fb3dc31a9 (patch)
treedef281f360c799fb96bc7b2d5def866c52e4f408
parent641e7eb38b6b076362d899b1e3dce665d729d08e (diff)
parent7129d7c0f3ce11839f8b8a576eb1e2c093fb96cc (diff)
downloadtangerine-wallet-browser-26d2f5cd0ebe8a0b248253b1f932457fb3dc31a9.tar
tangerine-wallet-browser-26d2f5cd0ebe8a0b248253b1f932457fb3dc31a9.tar.gz
tangerine-wallet-browser-26d2f5cd0ebe8a0b248253b1f932457fb3dc31a9.tar.bz2
tangerine-wallet-browser-26d2f5cd0ebe8a0b248253b1f932457fb3dc31a9.tar.lz
tangerine-wallet-browser-26d2f5cd0ebe8a0b248253b1f932457fb3dc31a9.tar.xz
tangerine-wallet-browser-26d2f5cd0ebe8a0b248253b1f932457fb3dc31a9.tar.zst
tangerine-wallet-browser-26d2f5cd0ebe8a0b248253b1f932457fb3dc31a9.zip
Merge pull request #3970 from MetaMask/i3651-removeGlobalLog
Remove reliance on window.log
-rw-r--r--.eslintrc1
-rw-r--r--app/scripts/background.js3
-rw-r--r--app/scripts/controllers/blacklist.js1
-rw-r--r--app/scripts/controllers/currency.js1
-rw-r--r--app/scripts/controllers/infura.js1
-rw-r--r--app/scripts/controllers/network.js1
-rw-r--r--app/scripts/controllers/recent-blocks.js1
-rw-r--r--app/scripts/controllers/shapeshift.js1
-rw-r--r--app/scripts/controllers/transactions.js1
-rw-r--r--app/scripts/inpage.js7
-rw-r--r--app/scripts/lib/createLoggerMiddleware.js2
-rw-r--r--app/scripts/lib/local-store.js1
-rw-r--r--app/scripts/lib/personal-message-manager.js1
-rw-r--r--app/scripts/lib/seed-phrase-verifier.js1
-rw-r--r--app/scripts/lib/typed-message-manager.js2
-rw-r--r--app/scripts/metamask-controller.js1
-rw-r--r--app/scripts/ui.js1
-rw-r--r--old-ui/app/app.js1
-rw-r--r--old-ui/app/components/ens-input.js1
-rw-r--r--old-ui/app/components/pending-tx.js1
-rw-r--r--old-ui/app/components/token-list.js1
-rw-r--r--old-ui/app/conf-tx.js1
-rw-r--r--old-ui/lib/tx-helper.js1
-rw-r--r--package-lock.json237
-rw-r--r--ui/app/actions.js1
-rw-r--r--ui/app/app.js1
-rw-r--r--ui/app/components/ens-input.js1
-rw-r--r--ui/app/components/pages/home.js1
-rw-r--r--ui/app/components/pages/keychains/restore-vault.js1
-rw-r--r--ui/app/components/token-balance.js1
-rw-r--r--ui/app/components/token-list.js1
-rw-r--r--ui/app/conf-tx.js1
-rw-r--r--ui/app/keychains/hd/restore-vault.js1
-rw-r--r--ui/app/main-container.js1
-rw-r--r--ui/app/reducers/app.js1
-rw-r--r--ui/index.js3
-rw-r--r--ui/lib/tx-helper.js1
37 files changed, 172 insertions, 113 deletions
diff --git a/.eslintrc b/.eslintrc
index 8af71bf4e..511d6f216 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -35,7 +35,6 @@
"globals": {
"document": false,
- "log": true,
"navigator": false,
"web3": true,
"window": false
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 5878cd2e8..451b0d609 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -25,8 +25,7 @@ const getObjStructure = require('./lib/getObjStructure')
const STORAGE_KEY = 'metamask-config'
const METAMASK_DEBUG = process.env.METAMASK_DEBUG
-window.log = log
-log.setDefaultLevel(METAMASK_DEBUG ? 'debug' : 'warn')
+log.setDefaultLevel(process.env.METAMASK_DEBUG ? 'debug' : 'warn')
const platform = new ExtensionPlatform()
const notificationManager = new NotificationManager()
diff --git a/app/scripts/controllers/blacklist.js b/app/scripts/controllers/blacklist.js
index df41c90c0..d965f80b8 100644
--- a/app/scripts/controllers/blacklist.js
+++ b/app/scripts/controllers/blacklist.js
@@ -1,6 +1,7 @@
const ObservableStore = require('obs-store')
const extend = require('xtend')
const PhishingDetector = require('eth-phishing-detect/src/detector')
+const log = require('loglevel')
// compute phishing lists
const PHISHING_DETECTION_CONFIG = require('eth-phishing-detect/src/config.json')
diff --git a/app/scripts/controllers/currency.js b/app/scripts/controllers/currency.js
index 36b8808aa..d9e0a3e34 100644
--- a/app/scripts/controllers/currency.js
+++ b/app/scripts/controllers/currency.js
@@ -1,5 +1,6 @@
const ObservableStore = require('obs-store')
const extend = require('xtend')
+const log = require('loglevel')
// every ten minutes
const POLLING_INTERVAL = 600000
diff --git a/app/scripts/controllers/infura.js b/app/scripts/controllers/infura.js
index c6b4c9de2..8f6dd837e 100644
--- a/app/scripts/controllers/infura.js
+++ b/app/scripts/controllers/infura.js
@@ -1,5 +1,6 @@
const ObservableStore = require('obs-store')
const extend = require('xtend')
+const log = require('loglevel')
// every ten minutes
const POLLING_INTERVAL = 10 * 60 * 1000
diff --git a/app/scripts/controllers/network.js b/app/scripts/controllers/network.js
index 617456cd7..45574e673 100644
--- a/app/scripts/controllers/network.js
+++ b/app/scripts/controllers/network.js
@@ -9,6 +9,7 @@ const extend = require('xtend')
const EthQuery = require('eth-query')
const createEventEmitterProxy = require('../lib/events-proxy.js')
const networkConfig = require('../config.js')
+const log = require('loglevel')
const { OLD_UI_NETWORK_TYPE, DEFAULT_RPC } = networkConfig.enums
const INFURA_PROVIDER_TYPES = ['ropsten', 'rinkeby', 'kovan', 'mainnet']
diff --git a/app/scripts/controllers/recent-blocks.js b/app/scripts/controllers/recent-blocks.js
index 4ae3810eb..0c1ee4e38 100644
--- a/app/scripts/controllers/recent-blocks.js
+++ b/app/scripts/controllers/recent-blocks.js
@@ -2,6 +2,7 @@ const ObservableStore = require('obs-store')
const extend = require('xtend')
const BN = require('ethereumjs-util').BN
const EthQuery = require('eth-query')
+const log = require('loglevel')
class RecentBlocksController {
diff --git a/app/scripts/controllers/shapeshift.js b/app/scripts/controllers/shapeshift.js
index 3bbfaa1c5..b38b3812d 100644
--- a/app/scripts/controllers/shapeshift.js
+++ b/app/scripts/controllers/shapeshift.js
@@ -1,5 +1,6 @@
const ObservableStore = require('obs-store')
const extend = require('xtend')
+const log = require('loglevel')
// every three seconds when an incomplete tx is waiting
const POLLING_INTERVAL = 3000
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 336b0d8f7..c8211ebd7 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -7,6 +7,7 @@ const TransactionStateManager = require('../lib/tx-state-manager')
const TxGasUtil = require('../lib/tx-gas-utils')
const PendingTransactionTracker = require('../lib/pending-tx-tracker')
const NonceTracker = require('../lib/nonce-tracker')
+const log = require('loglevel')
/*
Transaction Controller is an aggregate of sub-controllers and trackers
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index ec99bfc35..92c732813 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -3,16 +3,11 @@ cleanContextForImports()
require('web3/dist/web3.min.js')
const log = require('loglevel')
const LocalMessageDuplexStream = require('post-message-stream')
-// const PingStream = require('ping-pong-stream/ping')
-// const endOfStream = require('end-of-stream')
const setupDappAutoReload = require('./lib/auto-reload.js')
const MetamaskInpageProvider = require('./lib/inpage-provider.js')
restoreContextAfterImports()
-const METAMASK_DEBUG = process.env.METAMASK_DEBUG
-window.log = log
-log.setDefaultLevel(METAMASK_DEBUG ? 'debug' : 'warn')
-
+log.setDefaultLevel(process.env.METAMASK_DEBUG ? 'debug' : 'warn')
//
// setup plugin communication
diff --git a/app/scripts/lib/createLoggerMiddleware.js b/app/scripts/lib/createLoggerMiddleware.js
index 2707cbd9e..fc6abf828 100644
--- a/app/scripts/lib/createLoggerMiddleware.js
+++ b/app/scripts/lib/createLoggerMiddleware.js
@@ -1,3 +1,5 @@
+const log = require('loglevel')
+
// log rpc activity
module.exports = createLoggerMiddleware
diff --git a/app/scripts/lib/local-store.js b/app/scripts/lib/local-store.js
index 5b47985f6..2dda0ba1f 100644
--- a/app/scripts/lib/local-store.js
+++ b/app/scripts/lib/local-store.js
@@ -3,6 +3,7 @@
// https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/storage/local
const extension = require('extensionizer')
+const log = require('loglevel')
module.exports = class ExtensionStore {
constructor() {
diff --git a/app/scripts/lib/personal-message-manager.js b/app/scripts/lib/personal-message-manager.js
index 6602f5aa8..43a7d0b42 100644
--- a/app/scripts/lib/personal-message-manager.js
+++ b/app/scripts/lib/personal-message-manager.js
@@ -3,6 +3,7 @@ const ObservableStore = require('obs-store')
const ethUtil = require('ethereumjs-util')
const createId = require('./random-id')
const hexRe = /^[0-9A-Fa-f]+$/g
+const log = require('loglevel')
module.exports = class PersonalMessageManager extends EventEmitter {
diff --git a/app/scripts/lib/seed-phrase-verifier.js b/app/scripts/lib/seed-phrase-verifier.js
index 9cea22029..7ba712c0d 100644
--- a/app/scripts/lib/seed-phrase-verifier.js
+++ b/app/scripts/lib/seed-phrase-verifier.js
@@ -1,4 +1,5 @@
const KeyringController = require('eth-keyring-controller')
+const log = require('loglevel')
const seedPhraseVerifier = {
diff --git a/app/scripts/lib/typed-message-manager.js b/app/scripts/lib/typed-message-manager.js
index 8b760790e..60042155e 100644
--- a/app/scripts/lib/typed-message-manager.js
+++ b/app/scripts/lib/typed-message-manager.js
@@ -3,7 +3,7 @@ const ObservableStore = require('obs-store')
const createId = require('./random-id')
const assert = require('assert')
const sigUtil = require('eth-sig-util')
-
+const log = require('loglevel')
module.exports = class TypedMessageManager extends EventEmitter {
constructor (opts) {
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index fa7890c50..dbb8efc6e 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -44,6 +44,7 @@ const BN = require('ethereumjs-util').BN
const GWEI_BN = new BN('1000000000')
const percentile = require('percentile')
const seedPhraseVerifier = require('./lib/seed-phrase-verifier')
+const log = require('loglevel')
module.exports = class MetamaskController extends EventEmitter {
diff --git a/app/scripts/ui.js b/app/scripts/ui.js
index 13c7ac5ec..c326ca1c3 100644
--- a/app/scripts/ui.js
+++ b/app/scripts/ui.js
@@ -9,6 +9,7 @@ const ExtensionPlatform = require('./platforms/extension')
const NotificationManager = require('./lib/notification-manager')
const notificationManager = new NotificationManager()
const setupRaven = require('./lib/setupRaven')
+const log = require('loglevel')
start().catch(log.error)
diff --git a/old-ui/app/app.js b/old-ui/app/app.js
index 37611987f..fc0d634aa 100644
--- a/old-ui/app/app.js
+++ b/old-ui/app/app.js
@@ -3,6 +3,7 @@ const Component = require('react').Component
const connect = require('react-redux').connect
const h = require('react-hyperscript')
const actions = require('../../ui/app/actions')
+const log = require('loglevel')
// mascara
const MascaraFirstTime = require('../../mascara/src/app/first-time').default
const MascaraBuyEtherScreen = require('../../mascara/src/app/first-time/buy-ether-screen').default
diff --git a/old-ui/app/components/ens-input.js b/old-ui/app/components/ens-input.js
index c85a23514..d09c30644 100644
--- a/old-ui/app/components/ens-input.js
+++ b/old-ui/app/components/ens-input.js
@@ -8,6 +8,7 @@ const ENS = require('ethjs-ens')
const networkMap = require('ethjs-ens/lib/network-map.json')
const ensRE = /.+\..+$/
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
+const log = require('loglevel')
module.exports = EnsInput
diff --git a/old-ui/app/components/pending-tx.js b/old-ui/app/components/pending-tx.js
index 7f63d9fdf..cd4189fc4 100644
--- a/old-ui/app/components/pending-tx.js
+++ b/old-ui/app/components/pending-tx.js
@@ -3,6 +3,7 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits
const actions = require('../../../ui/app/actions')
const clone = require('clone')
+const log = require('loglevel')
const ethUtil = require('ethereumjs-util')
const BN = ethUtil.BN
diff --git a/old-ui/app/components/token-list.js b/old-ui/app/components/token-list.js
index 149733b89..e20594b61 100644
--- a/old-ui/app/components/token-list.js
+++ b/old-ui/app/components/token-list.js
@@ -3,6 +3,7 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits
const TokenTracker = require('eth-token-tracker')
const TokenCell = require('./token-cell.js')
+const log = require('loglevel')
module.exports = TokenList
diff --git a/old-ui/app/conf-tx.js b/old-ui/app/conf-tx.js
index 1bb8eb97c..67eb31c37 100644
--- a/old-ui/app/conf-tx.js
+++ b/old-ui/app/conf-tx.js
@@ -7,6 +7,7 @@ const NetworkIndicator = require('./components/network')
const LoadingIndicator = require('./components/loading')
const txHelper = require('../lib/tx-helper')
const isPopupOrNotification = require('../../app/scripts/lib/is-popup-or-notification')
+const log = require('loglevel')
const PendingTx = require('./components/pending-tx')
const PendingMsg = require('./components/pending-msg')
diff --git a/old-ui/lib/tx-helper.js b/old-ui/lib/tx-helper.js
index de3f00d2d..0a6f55a63 100644
--- a/old-ui/lib/tx-helper.js
+++ b/old-ui/lib/tx-helper.js
@@ -1,4 +1,5 @@
const valuesFor = require('../app/util').valuesFor
+const log = require('loglevel')
module.exports = function (unapprovedTxs, unapprovedMsgs, personalMsgs, typedMessages, network) {
log.debug('tx-helper called with params:')
diff --git a/package-lock.json b/package-lock.json
index 8b6ffe453..fad386909 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -645,7 +645,7 @@
"resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz",
"integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=",
"requires": {
- "make-iterator": "1.0.1"
+ "make-iterator": "1.0.0"
}
},
"arr-flatten": {
@@ -658,7 +658,7 @@
"resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz",
"integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=",
"requires": {
- "make-iterator": "1.0.1"
+ "make-iterator": "1.0.0"
}
},
"arr-union": {
@@ -3362,7 +3362,7 @@
"requires": {
"arr-map": "2.0.2",
"for-own": "1.0.0",
- "make-iterator": "1.0.1"
+ "make-iterator": "1.0.0"
},
"dependencies": {
"for-own": {
@@ -5827,29 +5827,15 @@
"resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz",
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
"requires": {
- "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#71f123b676f2b2d81bc20f343670d90045a3d3d8",
+ "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#4ea2fdfed09e8f99117d9362d17c6b01b64a2bcf",
"ethereumjs-util": "5.1.3"
},
"dependencies": {
"ethereumjs-abi": {
- "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#71f123b676f2b2d81bc20f343670d90045a3d3d8",
+ "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#4ea2fdfed09e8f99117d9362d17c6b01b64a2bcf",
"requires": {
"bn.js": "4.11.8",
- "ethereumjs-util": "4.5.0"
- },
- "dependencies": {
- "ethereumjs-util": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz",
- "integrity": "sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=",
- "requires": {
- "bn.js": "4.11.8",
- "create-hash": "1.1.3",
- "keccakjs": "0.2.1",
- "rlp": "2.0.0",
- "secp256k1": "3.4.0"
- }
- }
+ "ethereumjs-util": "5.1.3"
}
},
"ethereumjs-util": {
@@ -6954,7 +6940,7 @@
"requires": {
"detect-file": "1.0.0",
"is-glob": "3.1.0",
- "micromatch": "3.1.10",
+ "micromatch": "3.1.9",
"resolve-dir": "1.0.1"
},
"dependencies": {
@@ -6969,22 +6955,32 @@
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"braces": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
- "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz",
+ "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==",
"requires": {
"arr-flatten": "1.1.0",
"array-unique": "0.3.2",
+ "define-property": "1.0.0",
"extend-shallow": "2.0.1",
"fill-range": "4.0.0",
"isobject": "3.0.1",
+ "kind-of": "6.0.2",
"repeat-element": "1.1.2",
"snapdragon": "0.8.1",
"snapdragon-node": "2.1.1",
"split-string": "3.1.0",
- "to-regex": "3.0.2"
+ "to-regex": "3.0.1"
},
"dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "requires": {
+ "is-descriptor": "1.0.2"
+ }
+ },
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
@@ -7015,7 +7011,7 @@
"posix-character-classes": "0.1.1",
"regex-not": "1.0.0",
"snapdragon": "0.8.1",
- "to-regex": "3.0.2"
+ "to-regex": "3.0.1"
},
"dependencies": {
"define-property": {
@@ -7082,7 +7078,7 @@
"fragment-cache": "0.2.1",
"regex-not": "1.0.0",
"snapdragon": "0.8.1",
- "to-regex": "3.0.2"
+ "to-regex": "3.0.1"
},
"dependencies": {
"define-property": {
@@ -7191,6 +7187,21 @@
}
}
},
+ "is-odd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz",
+ "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==",
+ "requires": {
+ "is-number": "4.0.0"
+ },
+ "dependencies": {
+ "is-number": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ=="
+ }
+ }
+ },
"isobject": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
@@ -7202,13 +7213,13 @@
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
},
"micromatch": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
- "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+ "version": "3.1.9",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz",
+ "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==",
"requires": {
"arr-diff": "4.0.0",
"array-unique": "0.3.2",
- "braces": "2.3.2",
+ "braces": "2.3.1",
"define-property": "2.0.2",
"extend-shallow": "3.0.2",
"extglob": "2.0.4",
@@ -7218,29 +7229,26 @@
"object.pick": "1.3.0",
"regex-not": "1.0.0",
"snapdragon": "0.8.1",
- "to-regex": "3.0.2"
+ "to-regex": "3.0.1"
}
},
- "to-regex": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
- "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+ "nanomatch": {
+ "version": "1.2.9",
+ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz",
+ "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==",
"requires": {
+ "arr-diff": "4.0.0",
+ "array-unique": "0.3.2",
"define-property": "2.0.2",
"extend-shallow": "3.0.2",
- "regex-not": "1.0.2",
- "safe-regex": "1.1.0"
- },
- "dependencies": {
- "regex-not": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
- "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
- "requires": {
- "extend-shallow": "3.0.2",
- "safe-regex": "1.1.0"
- }
- }
+ "fragment-cache": "0.2.1",
+ "is-odd": "2.0.0",
+ "is-windows": "1.0.2",
+ "kind-of": "6.0.2",
+ "object.pick": "1.3.0",
+ "regex-not": "1.0.0",
+ "snapdragon": "0.8.1",
+ "to-regex": "3.0.1"
}
}
}
@@ -7352,9 +7360,9 @@
"dev": true
},
"flush-write-stream": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz",
- "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz",
+ "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=",
"requires": {
"inherits": "2.0.3",
"readable-stream": "2.3.3"
@@ -11679,6 +11687,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz",
"integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==",
+ "dev": true,
"requires": {
"is-number": "4.0.0"
},
@@ -11686,7 +11695,8 @@
"is-number": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
- "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ=="
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
+ "dev": true
}
}
},
@@ -13041,7 +13051,7 @@
"resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz",
"integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=",
"requires": {
- "flush-write-stream": "1.0.3"
+ "flush-write-stream": "1.0.2"
}
},
"left-pad": {
@@ -14120,18 +14130,11 @@
}
},
"make-iterator": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
- "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.0.tgz",
+ "integrity": "sha1-V7713IXSOSO6I3ZzJNjo+PPZaUs=",
"requires": {
- "kind-of": "6.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
- }
+ "kind-of": "3.2.2"
}
},
"map-async": {
@@ -14174,7 +14177,7 @@
"integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
"requires": {
"findup-sync": "2.0.0",
- "micromatch": "3.1.10",
+ "micromatch": "3.1.9",
"resolve": "1.4.0",
"stack-trace": "0.0.10"
},
@@ -14190,22 +14193,32 @@
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"braces": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
- "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz",
+ "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==",
"requires": {
"arr-flatten": "1.1.0",
"array-unique": "0.3.2",
+ "define-property": "1.0.0",
"extend-shallow": "2.0.1",
"fill-range": "4.0.0",
"isobject": "3.0.1",
+ "kind-of": "6.0.2",
"repeat-element": "1.1.2",
"snapdragon": "0.8.1",
"snapdragon-node": "2.1.1",
"split-string": "3.1.0",
- "to-regex": "3.0.2"
+ "to-regex": "3.0.1"
},
"dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "requires": {
+ "is-descriptor": "1.0.2"
+ }
+ },
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
@@ -14236,7 +14249,7 @@
"posix-character-classes": "0.1.1",
"regex-not": "1.0.0",
"snapdragon": "0.8.1",
- "to-regex": "3.0.2"
+ "to-regex": "3.0.1"
},
"dependencies": {
"define-property": {
@@ -14303,7 +14316,7 @@
"fragment-cache": "0.2.1",
"regex-not": "1.0.0",
"snapdragon": "0.8.1",
- "to-regex": "3.0.2"
+ "to-regex": "3.0.1"
},
"dependencies": {
"define-property": {
@@ -14399,6 +14412,21 @@
}
}
},
+ "is-odd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz",
+ "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==",
+ "requires": {
+ "is-number": "4.0.0"
+ },
+ "dependencies": {
+ "is-number": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ=="
+ }
+ }
+ },
"isobject": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
@@ -14410,13 +14438,13 @@
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
},
"micromatch": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
- "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+ "version": "3.1.9",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz",
+ "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==",
"requires": {
"arr-diff": "4.0.0",
"array-unique": "0.3.2",
- "braces": "2.3.2",
+ "braces": "2.3.1",
"define-property": "2.0.2",
"extend-shallow": "3.0.2",
"extglob": "2.0.4",
@@ -14426,29 +14454,26 @@
"object.pick": "1.3.0",
"regex-not": "1.0.0",
"snapdragon": "0.8.1",
- "to-regex": "3.0.2"
+ "to-regex": "3.0.1"
}
},
- "to-regex": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
- "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+ "nanomatch": {
+ "version": "1.2.9",
+ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz",
+ "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==",
"requires": {
+ "arr-diff": "4.0.0",
+ "array-unique": "0.3.2",
"define-property": "2.0.2",
"extend-shallow": "3.0.2",
- "regex-not": "1.0.2",
- "safe-regex": "1.1.0"
- },
- "dependencies": {
- "regex-not": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
- "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
- "requires": {
- "extend-shallow": "3.0.2",
- "safe-regex": "1.1.0"
- }
- }
+ "fragment-cache": "0.2.1",
+ "is-odd": "2.0.0",
+ "is-windows": "1.0.2",
+ "kind-of": "6.0.2",
+ "object.pick": "1.3.0",
+ "regex-not": "1.0.0",
+ "snapdragon": "0.8.1",
+ "to-regex": "3.0.1"
}
}
}
@@ -15172,6 +15197,7 @@
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz",
"integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==",
+ "dev": true,
"requires": {
"arr-diff": "4.0.0",
"array-unique": "0.3.2",
@@ -15190,17 +15216,20 @@
"arr-diff": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
- "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+ "dev": true
},
"array-unique": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
- "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+ "dev": true
},
"define-property": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
"integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+ "dev": true,
"requires": {
"is-descriptor": "1.0.2",
"isobject": "3.0.1"
@@ -15210,6 +15239,7 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
"integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+ "dev": true,
"requires": {
"assign-symbols": "1.0.0",
"is-extendable": "1.0.1"
@@ -15219,6 +15249,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+ "dev": true,
"requires": {
"is-plain-object": "2.0.4"
}
@@ -15226,12 +15257,14 @@
"isobject": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
- "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+ "dev": true
},
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
}
}
},
@@ -17872,7 +17905,7 @@
"integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
"requires": {
"for-own": "1.0.0",
- "make-iterator": "1.0.1"
+ "make-iterator": "1.0.0"
},
"dependencies": {
"for-own": {
@@ -17915,7 +17948,7 @@
"integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=",
"requires": {
"for-own": "1.0.0",
- "make-iterator": "1.0.1"
+ "make-iterator": "1.0.0"
},
"dependencies": {
"for-own": {
@@ -20476,7 +20509,8 @@
"ret": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
- "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
+ "dev": true
},
"revalidator": {
"version": "0.1.8",
@@ -20576,6 +20610,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+ "dev": true,
"requires": {
"ret": "0.1.15"
}
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 0748a5bea..780edcaba 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -3,6 +3,7 @@ const getBuyEthUrl = require('../../app/scripts/lib/buy-eth-url')
const { getTokenAddressFromTokenObject } = require('./util')
const ethUtil = require('ethereumjs-util')
const { fetchLocale } = require('../i18n-helper')
+const log = require('loglevel')
var actions = {
_setBackgroundConnection: _setBackgroundConnection,
diff --git a/ui/app/app.js b/ui/app/app.js
index 75c3febb0..827b4e9ce 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -6,6 +6,7 @@ const { compose } = require('recompose')
const h = require('react-hyperscript')
const actions = require('./actions')
const classnames = require('classnames')
+const log = require('loglevel')
// init
const InitializeScreen = require('../../mascara/src/app/first-time').default
diff --git a/ui/app/components/ens-input.js b/ui/app/components/ens-input.js
index feb0a7037..aff4b6ef6 100644
--- a/ui/app/components/ens-input.js
+++ b/ui/app/components/ens-input.js
@@ -11,6 +11,7 @@ const ensRE = /.+\..+$/
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
const connect = require('react-redux').connect
const ToAutoComplete = require('./send/to-autocomplete')
+const log = require('loglevel')
EnsInput.contextTypes = {
t: PropTypes.func,
diff --git a/ui/app/components/pages/home.js b/ui/app/components/pages/home.js
index 7857a2a99..90b8e1d37 100644
--- a/ui/app/components/pages/home.js
+++ b/ui/app/components/pages/home.js
@@ -5,6 +5,7 @@ const { Redirect, withRouter } = require('react-router-dom')
const { compose } = require('recompose')
const h = require('react-hyperscript')
const actions = require('../../actions')
+const log = require('loglevel')
// init
const NewKeyChainScreen = require('../../new-keychain')
diff --git a/ui/app/components/pages/keychains/restore-vault.js b/ui/app/components/pages/keychains/restore-vault.js
index d57894e00..33575bfbb 100644
--- a/ui/app/components/pages/keychains/restore-vault.js
+++ b/ui/app/components/pages/keychains/restore-vault.js
@@ -6,6 +6,7 @@ const connect = require('../../../metamask-connect')
const h = require('react-hyperscript')
const { createNewVaultAndRestore, unMarkPasswordForgotten } = require('../../../actions')
const { DEFAULT_ROUTE } = require('../../../routes')
+const log = require('loglevel')
class RestoreVaultPage extends PersistentForm {
constructor (props) {
diff --git a/ui/app/components/token-balance.js b/ui/app/components/token-balance.js
index 2f71c0687..1900ccec7 100644
--- a/ui/app/components/token-balance.js
+++ b/ui/app/components/token-balance.js
@@ -4,6 +4,7 @@ const inherits = require('util').inherits
const TokenTracker = require('eth-token-tracker')
const connect = require('react-redux').connect
const selectors = require('../selectors')
+const log = require('loglevel')
function mapStateToProps (state) {
return {
diff --git a/ui/app/components/token-list.js b/ui/app/components/token-list.js
index 150a3762d..4189cf801 100644
--- a/ui/app/components/token-list.js
+++ b/ui/app/components/token-list.js
@@ -6,6 +6,7 @@ const TokenTracker = require('eth-token-tracker')
const TokenCell = require('./token-cell.js')
const connect = require('react-redux').connect
const selectors = require('../selectors')
+const log = require('loglevel')
function mapStateToProps (state) {
return {
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index fee7cd36f..b71538e31 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -6,6 +6,7 @@ const { withRouter } = require('react-router-dom')
const { compose } = require('recompose')
const actions = require('./actions')
const txHelper = require('../lib/tx-helper')
+const log = require('loglevel')
const PendingTx = require('./components/pending-tx')
const SignatureRequest = require('./components/signature-request')
diff --git a/ui/app/keychains/hd/restore-vault.js b/ui/app/keychains/hd/restore-vault.js
index 38ad14adb..913d20505 100644
--- a/ui/app/keychains/hd/restore-vault.js
+++ b/ui/app/keychains/hd/restore-vault.js
@@ -4,6 +4,7 @@ const PersistentForm = require('../../../lib/persistent-form')
const connect = require('react-redux').connect
const h = require('react-hyperscript')
const actions = require('../../actions')
+const log = require('loglevel')
RestoreVaultScreen.contextTypes = {
t: PropTypes.func,
diff --git a/ui/app/main-container.js b/ui/app/main-container.js
index 6dd4ff151..c305687ea 100644
--- a/ui/app/main-container.js
+++ b/ui/app/main-container.js
@@ -4,6 +4,7 @@ const inherits = require('util').inherits
const AccountAndTransactionDetails = require('./account-and-transaction-details')
const Settings = require('./components/pages/settings')
const UnlockScreen = require('./components/pages/unlock')
+const log = require('loglevel')
module.exports = MainContainer
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 74a0f9299..2b39eb8db 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -1,6 +1,7 @@
const extend = require('xtend')
const actions = require('../actions')
const txHelper = require('../../lib/tx-helper')
+const log = require('loglevel')
module.exports = reduceApp
diff --git a/ui/index.js b/ui/index.js
index 746e28eab..7b6faac76 100644
--- a/ui/index.js
+++ b/ui/index.js
@@ -6,8 +6,7 @@ const configureStore = require('./app/store')
const txHelper = require('./lib/tx-helper')
const { fetchLocale } = require('./i18n-helper')
const { OLD_UI_NETWORK_TYPE, BETA_UI_NETWORK_TYPE } = require('../app/scripts/config').enums
-
-global.log = require('loglevel')
+const log = require('loglevel')
module.exports = launchMetamaskUi
diff --git a/ui/lib/tx-helper.js b/ui/lib/tx-helper.js
index de3f00d2d..0a6f55a63 100644
--- a/ui/lib/tx-helper.js
+++ b/ui/lib/tx-helper.js
@@ -1,4 +1,5 @@
const valuesFor = require('../app/util').valuesFor
+const log = require('loglevel')
module.exports = function (unapprovedTxs, unapprovedMsgs, personalMsgs, typedMessages, network) {
log.debug('tx-helper called with params:')