Skip to content

Commit

Permalink
Fix metaspartan#59 bind web3 to window
Browse files Browse the repository at this point in the history
  • Loading branch information
高田田 committed Dec 7, 2018
1 parent d33f911 commit 37afdf7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,10 @@ angular.module('ethExplorer', ['ngRoute','ui.bootstrap','filters','ngSanitize'])

// begin AltSheets changes
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://"+GETH_HOSTNAME+":"+GETH_RPCPORT));
// end AltSheets changes
web3.setProvider(new web3.providers.HttpProvider("http://"+GETH_HOSTNAME+":"+GETH_RPCPORT));
// end AltSheets changes

$rootScope.web3=web3;
// MetaMask injects its own web3 instance in all pages, override it
// as it might be not compatible with the one used here
if (window.web3)
window.web3 = web3;
window.web3 = web3;
function sleepFor( sleepDuration ){
var now = new Date().getTime();
while(new Date().getTime() < now + sleepDuration){ /* do nothing */ }
Expand Down

0 comments on commit 37afdf7

Please sign in to comment.