|
|
@ -5,8 +5,9 @@ var Web3 = require('web3'); |
|
|
|
|
|
|
|
|
|
|
|
var injectedProvider; |
|
|
|
var injectedProvider; |
|
|
|
|
|
|
|
|
|
|
|
if (typeof web3 !== 'undefined') { |
|
|
|
var web3; |
|
|
|
injectedProvider = web3.currentProvider; |
|
|
|
if (typeof window.web3 !== 'undefined') { |
|
|
|
|
|
|
|
injectedProvider = window.web3.currentProvider; |
|
|
|
web3 = new Web3(injectedProvider); |
|
|
|
web3 = new Web3(injectedProvider); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545')); |
|
|
|
web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545')); |
|
|
|