Commit 2af1a920 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Decode response ABI only if there supposed to be return values

parent bbd07fd7
...@@ -352,6 +352,8 @@ UniversalDApp.prototype.getCallButton = function(args) { ...@@ -352,6 +352,8 @@ UniversalDApp.prototype.getCallButton = function(args) {
clearOutput($result); clearOutput($result);
$result.append(getReturnOutput(outputObj)).append(getGasUsedOutput(result.vm)); $result.append(getReturnOutput(outputObj)).append(getGasUsedOutput(result.vm));
// Only decode if there supposed to be fields
if (args.abi.outputs.length > 0) {
try { try {
var outputTypes = []; var outputTypes = [];
for (var i = 0; i < args.abi.outputs.length; i++) { for (var i = 0; i < args.abi.outputs.length; i++) {
...@@ -370,6 +372,7 @@ UniversalDApp.prototype.getCallButton = function(args) { ...@@ -370,6 +372,7 @@ UniversalDApp.prototype.getCallButton = function(args) {
$result.append(getDecodedOutput(decodedObj)); $result.append(getDecodedOutput(decodedObj));
} catch (e) { } catch (e) {
} }
}
} else if (args.abi.constant && !isConstructor) { } else if (args.abi.constant && !isConstructor) {
replaceOutput($result, getReturnOutput(result)); replaceOutput($result, getReturnOutput(result));
} else { } else {
......
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