Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
updated to web3.js 0.18.2, please run yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
frozeman committed Feb 15, 2017
1 parent 9b12175 commit 50ff281
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
12 changes: 9 additions & 3 deletions interface/client/lib/ethereum/1_web3js_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
if(typeof web3 !== 'undefined') {
console.info('Web3 already initialized, re-using provider.');

web3 = new Web3(web3.currentProvider);
// add web3 backwards compatibility
if(!web3.currentProvider.sendAsync) {
web3.currentProvider.sendAsync = web3.currentProvider.send;
web3.currentProvider.send = web3.currentProvider.sendSync;
}

web3 = new Web3(web3.currentProvider);
} else {
console.info('Web3 not yet initialized, doing so now with HttpProvider.');
console.info('Web3 not yet initialized, doing so now with HttpProvider.');

web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var setWindowSize = function(template){
}


var defaultEstimateGas = 5000000;
var defaultEstimateGas = 50000000;

/**
The sendTransaction confirmation popup window template
Expand Down Expand Up @@ -327,7 +327,7 @@ Template['popupWindows_sendTransactionConfirmation'].events({
TemplateVar.set('unlocking', true);

// unlock and send transaction!
web3.personal.unlockAccountAndSendTransaction(data, pw || '', function(e, res){
web3.personal.sendTransaction(data, pw || '', function(e, res){
pw = null;
TemplateVar.set(template, 'unlocking', false);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"underscore": "^1.8.3",
"underscore-deep-extend": "^1.1.5",
"uuid": "^3.0.1",
"web3": "^0.17.0-alpha",
"web3": "^0.18.2",
"yargs": "^6.6.0"
},
"devDependencies": {
Expand Down
11 changes: 8 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4231,13 +4231,14 @@ wdio-dot-reporter@^0.0.6:
dependencies:
babel-runtime "^5.8.25"

web3@^0.17.0-alpha:
version "0.17.0-beta"
resolved "https://registry.yarnpkg.com/web3/-/web3-0.17.0-beta.tgz#57af38245bff7a32099f7ce5780fad5bbc00da5b"
web3@^0.18.2:
version "0.18.2"
resolved "https://registry.yarnpkg.com/web3/-/web3-0.18.2.tgz#61b1a6edf5056820e22e1ef082f54c279f4bf758"
dependencies:
bignumber.js "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2"
crypto-js "^3.1.4"
utf8 "^2.1.1"
xhr2 "*"
xmlhttprequest "*"

webdriverio@^4.0.4:
Expand Down Expand Up @@ -4335,6 +4336,10 @@ xdg-basedir@^2.0.0:
dependencies:
os-homedir "^1.0.0"

xhr2@*:
version "0.1.4"
resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.1.4.tgz#7f87658847716db5026323812f818cadab387a5f"

xml2js@^0.4.17:
version "0.4.17"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868"
Expand Down

0 comments on commit 50ff281

Please sign in to comment.