diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-12 22:03:06 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-12 22:06:15 +0800 |
commit | ae084cef6c5cf7240e5fd1b3ff762e35dab5cf2b (patch) | |
tree | e99fdd9172344525c1c6ceecbd6443014bf4a5b7 | |
parent | f5eb1512d4dd2c521034d121f3de3e7957cfd53e (diff) | |
download | tangerine-wallet-browser-ae084cef6c5cf7240e5fd1b3ff762e35dab5cf2b.tar tangerine-wallet-browser-ae084cef6c5cf7240e5fd1b3ff762e35dab5cf2b.tar.gz tangerine-wallet-browser-ae084cef6c5cf7240e5fd1b3ff762e35dab5cf2b.tar.bz2 tangerine-wallet-browser-ae084cef6c5cf7240e5fd1b3ff762e35dab5cf2b.tar.lz tangerine-wallet-browser-ae084cef6c5cf7240e5fd1b3ff762e35dab5cf2b.tar.xz tangerine-wallet-browser-ae084cef6c5cf7240e5fd1b3ff762e35dab5cf2b.tar.zst tangerine-wallet-browser-ae084cef6c5cf7240e5fd1b3ff762e35dab5cf2b.zip |
Update MetaMaskController to use ES6 destructuring, const, let
-rw-r--r-- | app/scripts/metamask-controller.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 16ab34c7d..8de17d7f0 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -19,7 +19,7 @@ const createSubscriptionManager = require('eth-json-rpc-filters/subscriptionMana const createOriginMiddleware = require('./lib/createOriginMiddleware') const createLoggerMiddleware = require('./lib/createLoggerMiddleware') const createProviderMiddleware = require('./lib/createProviderMiddleware') -const setupMultiplex = require('./lib/stream-utils.js').setupMultiplex +const {setupMultiplex} = require('./lib/stream-utils.js') const KeyringController = require('eth-keyring-controller') const NetworkController = require('./controllers/network') const PreferencesController = require('./controllers/preferences') @@ -42,9 +42,9 @@ const ProviderApprovalController = require('./controllers/provider-approval') const nodeify = require('./lib/nodeify') const accountImporter = require('./account-import-strategies') const getBuyEthUrl = require('./lib/buy-eth-url') -const Mutex = require('await-semaphore').Mutex -const version = require('../manifest.json').version -const BN = require('ethereumjs-util').BN +const {Mutex} = require('await-semaphore') +const {version} = require('../manifest.json') +const {BN} = require('ethereumjs-util') const GWEI_BN = new BN('1000000000') const percentile = require('percentile') const seedPhraseVerifier = require('./lib/seed-phrase-verifier') @@ -207,7 +207,7 @@ module.exports = class MetamaskController extends EventEmitter { }) this.networkController.on('networkDidChange', () => { this.balancesController.updateAllBalances() - var currentCurrency = this.currencyController.getCurrentCurrency() + const currentCurrency = this.currencyController.getCurrentCurrency() this.setCurrentCurrency(currentCurrency, function () {}) }) this.balancesController.updateAllBalances() |