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;
if (typeof web3 !== 'undefined') {
injectedProvider = web3.currentProvider;
var web3;
if (typeof window.web3 !== 'undefined') {
injectedProvider = window.web3.currentProvider;
web3 = new Web3(injectedProvider);
} else {
web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));

Loading…
Cancel
Save