aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/network.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/controllers/network.js')
-rw-r--r--app/scripts/controllers/network.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/controllers/network.js b/app/scripts/controllers/network.js
index c07f13b8d..0a3e5e26b 100644
--- a/app/scripts/controllers/network.js
+++ b/app/scripts/controllers/network.js
@@ -28,9 +28,9 @@ module.exports = class NetworkController extends EventEmitter {
this._provider = provider
}
- initializeProvider (opts) {
+ initializeProvider (opts, providerContructor = MetaMaskProvider) {
this.providerInit = opts
- this._provider = MetaMaskProvider(opts)
+ this._provider = providerContructor(opts)
this._proxy = new Proxy(this._provider, {
get: (obj, name) => {
if (name === 'on') return this._on.bind(this)
@@ -38,6 +38,7 @@ module.exports = class NetworkController extends EventEmitter {
},
set: (obj, name, value) => {
this._provider[name] = value
+ return value
},
})
this.provider.on('block', this._logBlock.bind(this))