Use window.web3 to be canonical

pull/1/head
Alex Beregszaszi 9 years ago
parent 891501077f
commit 79a30f6c78
  1. 5
      src/app/execution-context.js

@ -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'));

Loading…
Cancel
Save