diff --git a/src/universal-dapp.js b/src/universal-dapp.js index d28fcc4d64..d771f429c9 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -635,7 +635,6 @@ UniversalDApp.prototype.runTx = function (data, args, cb) { from: self.options.getAddress ? self.options.getAddress() : self.web3.eth.accounts[0], to: to, data: data, - gas: gas, value: value }; if (constant && !isConstructor) { @@ -646,6 +645,10 @@ UniversalDApp.prototype.runTx = function (data, args, cb) { return cb(err, resp); } + if (resp > gas) { + return cb('Gas required exceeds limit: ' + resp); + } + tx.gas = resp; self.web3.eth.sendTransaction(tx, function (err, resp) {