|
|
|
@ -10,7 +10,7 @@ Web3Providers.prototype.addProvider = function (type, obj) { |
|
|
|
|
var web3 = init.loadWeb3() |
|
|
|
|
this.addWeb3(type, web3) |
|
|
|
|
} else if (type === 'vm') { |
|
|
|
|
this.addVM(obj) |
|
|
|
|
this.addVM(type, obj) |
|
|
|
|
} else { |
|
|
|
|
init.extendWeb3(obj) |
|
|
|
|
this.addWeb3(type, obj) |
|
|
|
@ -29,10 +29,10 @@ Web3Providers.prototype.addWeb3 = function (type, web3) { |
|
|
|
|
this.modes[type] = web3 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Web3Providers.prototype.addVM = function (vm) { |
|
|
|
|
Web3Providers.prototype.addVM = function (type, vm) { |
|
|
|
|
var vmProvider = new Web3VMProvider() |
|
|
|
|
vmProvider.setVM(vm) |
|
|
|
|
this.modes['VM'] = vmProvider |
|
|
|
|
this.modes[type] = vmProvider |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
module.exports = Web3Providers |
|
|
|
|