From 77b2758f547145d583e7bebbe3ccfefa73ad9ba0 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 5 Dec 2016 12:33:30 +0000 Subject: [PATCH] Udapp: properly pass the fallback ABI --- src/universal-dapp.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/universal-dapp.js b/src/universal-dapp.js index 99bfb8d26c..5b4eae7b6e 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -319,7 +319,7 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar var fallback = self.getFallbackInterface(abi) if (fallback) { $instance.append(self.getCallButton({ - abi: { constant: false, inputs: [], name: '(fallback)', outputs: [], type: 'function' }, + abi: fallback, encode: function (args) { return '' }, @@ -619,8 +619,10 @@ UniversalDApp.prototype.getCallButton = function (args) { var title if (isConstructor) { title = 'Create' - } else { + } else if (args.abi.name) { title = args.abi.name + } else { + title = '(fallback)' } var button = $('