From 9cbf3277684b8c2f4c40502c1ec014e236a37fd6 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 7 Sep 2016 22:41:56 +0100 Subject: [PATCH 1/2] Remove legacy getABIInputForm --- src/universal-dapp.js | 50 +++++++++---------------------------------- 1 file changed, 10 insertions(+), 40 deletions(-) diff --git a/src/universal-dapp.js b/src/universal-dapp.js index 87d6a3f79e..4967c609ed 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -147,24 +147,19 @@ UniversalDApp.prototype.render = function () { self.$el.append($legend); - // NOTE: this might be used in the future - if (self.contracts.length === 0) { - self.$el.append(self.getABIInputForm()); - } else { - for (var c in self.contracts) { - var $contractEl = $('
'); + for (var c in self.contracts) { + var $contractEl = $('
'); - if (self.contracts[c].address) { - self.getInstanceInterface(self.contracts[c], self.contracts[c].address, $contractEl); - } else { - var $title = $('').text(self.contracts[c].name); - if (self.contracts[c].bytecode) { - $title.append($('
').text((self.contracts[c].bytecode.length / 2) + ' bytes')); - } - $contractEl.append($title).append(self.getCreateInterface($contractEl, self.contracts[c])); + if (self.contracts[c].address) { + self.getInstanceInterface(self.contracts[c], self.contracts[c].address, $contractEl); + } else { + var $title = $('').text(self.contracts[c].name); + if (self.contracts[c].bytecode) { + $title.append($('
').text((self.contracts[c].bytecode.length / 2) + ' bytes')); } - self.$el.append(self.renderOutputModifier(self.contracts[c].name, $contractEl)); + $contractEl.append($title).append(self.getCreateInterface($contractEl, self.contracts[c])); } + self.$el.append(self.renderOutputModifier(self.contracts[c].name, $contractEl)); } return self.$el; @@ -180,31 +175,6 @@ UniversalDApp.prototype.getContractByName = function (contractName) { return null; }; -UniversalDApp.prototype.getABIInputForm = function (cb) { - var self = this; - var $el = $('
'); - var $jsonInput = $('