Commit e6239d1a authored by yann300's avatar yann300 Committed by Alex Beregszaszi

fix txResult

parent bca94add
......@@ -549,14 +549,15 @@ UniversalDApp.prototype.getCallButton = function (args) {
var decoded
self.runTx({ to: args.address, data: data, useCall: args.abi.constant && !isConstructor }, function (err, txResult) {
var result
if (!txResult) {
replaceOutput($result, $('<span/>').text('callback contain no result ' + err).addClass('error'))
return
}
var result = txResult.result
if (err) {
replaceOutput($result, $('<span/>').text(err).addClass('error'))
// VM only
} else {
result = txResult.result
}
if (self.executionContext.isVM() && result.vm.exception === 0 && result.vm.exceptionError) {
} else if (self.executionContext.isVM() && result.vm.exception === 0 && result.vm.exceptionError) {
replaceOutput($result, $('<span/>').text('VM Exception: ' + result.vm.exceptionError).addClass('error'))
$result.append(getDebugTransaction(txResult))
// VM only
......
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