Commit bc5347ec authored by Iuri Matias's avatar Iuri Matias

simplify queryValue; remove one level of complexity

parent 0d78a7d1
...@@ -215,13 +215,12 @@ UniversalDApp.prototype.runTx = function (args, cb) { ...@@ -215,13 +215,12 @@ UniversalDApp.prototype.runTx = function (args, cb) {
if (args.value) { if (args.value) {
return next(null, args.value, gasLimit) return next(null, args.value, gasLimit)
} }
if (args.useCall) return next(null, 0, gasLimit) if (args.useCall || !self.transactionContextAPI.getValue) {
if (self.transactionContextAPI.getValue) { return next(null, 0, gasLimit)
}
self.transactionContextAPI.getValue(function (err, value) { self.transactionContextAPI.getValue(function (err, value) {
next(err, value, gasLimit) next(err, value, gasLimit)
}) })
}
next(null, 0, gasLimit)
}, },
function getAccount (value, gasLimit, next) { function getAccount (value, gasLimit, next) {
if (args.from) { if (args.from) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment