Skip to content

Commit

Permalink
Fixes "web3 is not a provider" error
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim committed Apr 27, 2018
1 parent 5336527 commit e592c52
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@ angular.module('ethExplorer', ['ngRoute','ui.bootstrap','filters','ngSanitize'])
//$locationProvider.html5Mode(true);
}])
.run(function($rootScope) {
var web3 = require('web3');
var Web3 = require('web3');

// begin AltSheets changes
web3.setProvider(new web3.providers.HttpProvider("http://"+GETH_HOSTNAME+":"+GETH_RPCPORT));
// end AltSheets changes
var web3 = new Web3();
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
Expand Down

0 comments on commit e592c52

Please sign in to comment.