mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
lint fixes
This commit is contained in:
parent
efa92a7fc5
commit
4d273d3cea
@ -1,6 +1,5 @@
|
||||
const assert = require('assert')
|
||||
const EventEmitter = require('events')
|
||||
const createMetamaskProvider = require('web3-provider-engine/zero.js')
|
||||
const ObservableStore = require('obs-store')
|
||||
const ComposedStore = require('obs-store/lib/composed')
|
||||
const extend = require('xtend')
|
||||
@ -77,10 +76,10 @@ module.exports = class NetworkController extends EventEmitter {
|
||||
assert(type !== 'rpc', `NetworkController.setProviderType - cannot connect by type "rpc"`)
|
||||
// skip if type already matches
|
||||
if (type === this.getProviderConfig().type) return
|
||||
// lookup rpcTarget for type
|
||||
// lookup rpcTarget for typecreateMetamaskProvider
|
||||
const rpcTarget = this.getRpcAddressForType(type)
|
||||
assert(rpcTarget, `NetworkController - unknown rpc address for type "${type}"`)
|
||||
// update connection
|
||||
// update connectioncreateMetamaskProvider
|
||||
this.providerStore.updateState({ type, rpcTarget })
|
||||
this._switchNetwork({ rpcUrl: rpcTarget })
|
||||
}
|
||||
@ -110,10 +109,6 @@ module.exports = class NetworkController extends EventEmitter {
|
||||
this._setClient(client)
|
||||
}
|
||||
|
||||
_createMetamaskProvider(providerParams) {
|
||||
const { provider, blockTracker } = createEthRpcClient(providerParams)
|
||||
}
|
||||
|
||||
_setClient (newClient) {
|
||||
// teardown old client
|
||||
const oldClient = this._currentClient
|
||||
|
@ -478,7 +478,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
result.push(selectedAddress)
|
||||
}
|
||||
return result
|
||||
},
|
||||
}
|
||||
|
||||
addNewAccount (cb) {
|
||||
const primaryKeyring = this.keyringController.getKeyringsByType('HD Key Tree')[0]
|
||||
|
Loading…
Reference in New Issue
Block a user