mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
controllers - network - more semantic assert
This commit is contained in:
parent
5ec631cad3
commit
bfedd2776d
@ -111,7 +111,7 @@ module.exports = class NetworkController extends EventEmitter {
|
||||
}
|
||||
|
||||
async setProviderType (type, forceUpdate = false) {
|
||||
assert(type !== 'rpc', `NetworkController.setProviderType - cannot connect by type "rpc"`)
|
||||
assert.notEqual(type, 'rpc', `NetworkController.setProviderType - cannot connect by type "rpc"`)
|
||||
// skip if type already matches
|
||||
if (type === this.getProviderConfig().type && !forceUpdate) {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user