Commit ce97097a authored by Alex Beregszaszi's avatar Alex Beregszaszi

Display the names of named output while decoding

parent bb60db97
...@@ -371,7 +371,12 @@ UniversalDApp.prototype.getCallButton = function(args) { ...@@ -371,7 +371,12 @@ UniversalDApp.prototype.getCallButton = function(args) {
// format decoded data // format decoded data
decodedObj = EthJS.ABI.stringify(outputTypes, decodedObj); decodedObj = EthJS.ABI.stringify(outputTypes, decodedObj);
for (var i = 0; i < outputTypes.length; i++) { for (var i = 0; i < outputTypes.length; i++) {
decodedObj[i] = outputTypes[i] + ': ' + decodedObj[i]; var name = args.abi.outputs[i].name;
if (name.length > 0) {
decodedObj[i] = outputTypes[i] + ' ' + name + ': ' + decodedObj[i];
} else {
decodedObj[i] = outputTypes[i] + ': ' + decodedObj[i];
}
} }
$result.append(getDecodedOutput(decodedObj)); $result.append(getDecodedOutput(decodedObj));
......
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