Commit c9a27536 authored by yann300's avatar yann300

add renderInstanceFromABI

parent c77be8e6
......@@ -277,11 +277,16 @@ UniversalDApp.prototype.getBalance = function (address, cb) {
}
}
UniversalDApp.prototype.renderInstance = function (contract, address, contractName) {
var abi = txHelper.sortAbiFunction(contract.abi)
return this.renderInstanceFromABI(abi, address, contractName)
}
// TODO this function was named before "appendChild".
// this will render an instance: contract name, contract address, and all the public functions
// basically this has to be called for the "atAddress" (line 393) and when a contract creation succeed
// this returns a DOM element
UniversalDApp.prototype.renderInstance = function (contract, address, contractName) {
UniversalDApp.prototype.renderInstanceFromABI = function (contractABI, address, contractName) {
var self = this
function remove () { instance.remove() }
......@@ -305,7 +310,7 @@ UniversalDApp.prototype.renderInstance = function (contract, address, contractNa
$(instance).toggleClass(`${css.hidesub}`)
}
var abi = txHelper.sortAbiFunction(contractabi)
var abi = txHelper.sortAbiFunction(contractABI)
instance.appendChild(title)
......
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