Commit 77b2758f authored by Alex Beregszaszi's avatar Alex Beregszaszi

Udapp: properly pass the fallback ABI

parent 03caa281
...@@ -319,7 +319,7 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar ...@@ -319,7 +319,7 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar
var fallback = self.getFallbackInterface(abi) var fallback = self.getFallbackInterface(abi)
if (fallback) { if (fallback) {
$instance.append(self.getCallButton({ $instance.append(self.getCallButton({
abi: { constant: false, inputs: [], name: '(fallback)', outputs: [], type: 'function' }, abi: fallback,
encode: function (args) { encode: function (args) {
return '' return ''
}, },
...@@ -619,8 +619,10 @@ UniversalDApp.prototype.getCallButton = function (args) { ...@@ -619,8 +619,10 @@ UniversalDApp.prototype.getCallButton = function (args) {
var title var title
if (isConstructor) { if (isConstructor) {
title = 'Create' title = 'Create'
} else { } else if (args.abi.name) {
title = args.abi.name title = args.abi.name
} else {
title = '(fallback)'
} }
var button = $('<button />') var button = $('<button />')
......
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