fix web3 issues

pull/1/head
d11e9 9 years ago
parent 6a712241f6
commit 1a95783e95
  1. 13
      libs/universal-dapp.js
  2. 2
      libs/web3.min.js

@ -306,14 +306,19 @@ UniversalDApp.prototype.runTx = function( data, args, cb) {
var func = web3.eth.contract( [args.abi] ).at( to );
func[args.abi.name].call( cb );
} else {
web3.eth.sendTransaction({
var tx = {
from: web3.eth.accounts[0],
to: to,
data: data,
gas: 1000000
}, function(err, resp) {
cb( err, resp );
});
}
web3.eth.estimateGas( tx, function(err, resp){
tx.gas = resp;
if (!err) web3.eth.sendTransaction( tx, function(err, resp) {
cb( err, resp );
});
else cb( err, resp);
})
}
} else {
try {

2
libs/web3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save