mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Update MetaMaskController to use ES6 destructuring, const, let
This commit is contained in:
parent
f5eb1512d4
commit
ae084cef6c
@ -19,7 +19,7 @@ const createSubscriptionManager = require('eth-json-rpc-filters/subscriptionMana
|
|||||||
const createOriginMiddleware = require('./lib/createOriginMiddleware')
|
const createOriginMiddleware = require('./lib/createOriginMiddleware')
|
||||||
const createLoggerMiddleware = require('./lib/createLoggerMiddleware')
|
const createLoggerMiddleware = require('./lib/createLoggerMiddleware')
|
||||||
const createProviderMiddleware = require('./lib/createProviderMiddleware')
|
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 KeyringController = require('eth-keyring-controller')
|
||||||
const NetworkController = require('./controllers/network')
|
const NetworkController = require('./controllers/network')
|
||||||
const PreferencesController = require('./controllers/preferences')
|
const PreferencesController = require('./controllers/preferences')
|
||||||
@ -42,9 +42,9 @@ const ProviderApprovalController = require('./controllers/provider-approval')
|
|||||||
const nodeify = require('./lib/nodeify')
|
const nodeify = require('./lib/nodeify')
|
||||||
const accountImporter = require('./account-import-strategies')
|
const accountImporter = require('./account-import-strategies')
|
||||||
const getBuyEthUrl = require('./lib/buy-eth-url')
|
const getBuyEthUrl = require('./lib/buy-eth-url')
|
||||||
const Mutex = require('await-semaphore').Mutex
|
const {Mutex} = require('await-semaphore')
|
||||||
const version = require('../manifest.json').version
|
const {version} = require('../manifest.json')
|
||||||
const BN = require('ethereumjs-util').BN
|
const {BN} = require('ethereumjs-util')
|
||||||
const GWEI_BN = new BN('1000000000')
|
const GWEI_BN = new BN('1000000000')
|
||||||
const percentile = require('percentile')
|
const percentile = require('percentile')
|
||||||
const seedPhraseVerifier = require('./lib/seed-phrase-verifier')
|
const seedPhraseVerifier = require('./lib/seed-phrase-verifier')
|
||||||
@ -207,7 +207,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
})
|
})
|
||||||
this.networkController.on('networkDidChange', () => {
|
this.networkController.on('networkDidChange', () => {
|
||||||
this.balancesController.updateAllBalances()
|
this.balancesController.updateAllBalances()
|
||||||
var currentCurrency = this.currencyController.getCurrentCurrency()
|
const currentCurrency = this.currencyController.getCurrentCurrency()
|
||||||
this.setCurrentCurrency(currentCurrency, function () {})
|
this.setCurrentCurrency(currentCurrency, function () {})
|
||||||
})
|
})
|
||||||
this.balancesController.updateAllBalances()
|
this.balancesController.updateAllBalances()
|
||||||
|
Loading…
Reference in New Issue
Block a user