Commit 0cafaeef authored by chriseth's avatar chriseth

Merge pull request #144 from axic/patch/show-web3-encoding-error

Display web3 encoding error
parents e44ceb83 fdeae6bd
...@@ -287,8 +287,14 @@ UniversalDApp.prototype.getCallButton = function(args) { ...@@ -287,8 +287,14 @@ UniversalDApp.prototype.getCallButton = function(args) {
return; return;
} }
var data = ''; var data = '';
if (!isConstructor || funArgs.length > 0) if (!isConstructor || funArgs.length > 0) {
try {
data = args.encode(funArgs); data = args.encode(funArgs);
} catch(e) {
replaceOutput($result, $('<span/>').text('Error encoding arguments: ' + e));
return;
}
}
if (data.slice(0, 9) == 'undefined') if (data.slice(0, 9) == 'undefined')
data = data.slice(9); data = data.slice(9);
if (data.slice(0, 2) == '0x') data = data.slice(2); if (data.slice(0, 2) == '0x') data = data.slice(2);
......
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