Commit f265dffd authored by yann300's avatar yann300

test before adding/removing

parent 9febad6b
...@@ -136,13 +136,17 @@ function ExecutionContext () { ...@@ -136,13 +136,17 @@ function ExecutionContext () {
} }
this.removeProvider = function (name) { this.removeProvider = function (name) {
delete this.customNetWorks[name] if (name && this.customNetWorks[name]) {
self.event.trigger('removeProvider', [name]) delete this.customNetWorks[name]
self.event.trigger('removeProvider', [name])
}
} }
this.addProvider = function (network) { this.addProvider = function (network) {
this.customNetWorks[network.name] = network if (network && network.name && network.url) {
self.event.trigger('addProvider', [network]) this.customNetWorks[network.name] = network
self.event.trigger('addProvider', [network])
}
} }
this.internalWeb3 = function () { this.internalWeb3 = function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment