remove unused variable (value is always true)

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent 2524879e96
commit d069e5cef5
  1. 4
      src/app.js
  2. 6
      src/universal-dapp-ui.js
  3. 1
      src/universal-dapp.js

@ -313,9 +313,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
registry.put({api: self._components.compilersArtefacts, name: 'compilersartefacts'}) registry.put({api: self._components.compilersArtefacts, name: 'compilersartefacts'})
// ----------------- UniversalDApp ----------------- // ----------------- UniversalDApp -----------------
var udapp = new UniversalDApp({ var udapp = new UniversalDApp({})
removable_instances: true
})
registry.put({api: udapp, name: 'udapp'}) registry.put({api: udapp, name: 'udapp'})
var udappUI = new UniversalDAppUI(udapp) var udappUI = new UniversalDAppUI(udapp)

@ -38,10 +38,8 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
${copyToClipboard(() => address)} ${copyToClipboard(() => address)}
</div>` </div>`
if (self.udapp.removable_instances) { var close = yo`<div class="${css.udappClose}" onclick=${remove}><i class="${css.closeIcon} fa fa-close" aria-hidden="true"></i></div>`
var close = yo`<div class="${css.udappClose}" onclick=${remove}><i class="${css.closeIcon} fa fa-close" aria-hidden="true"></i></div>` title.appendChild(close)
title.appendChild(close)
}
function remove () { function remove () {
instance.remove() instance.remove()

@ -27,7 +27,6 @@ function UniversalDApp (opts, localRegistry) {
self.data = {} self.data = {}
self._components = {} self._components = {}
self._components.registry = localRegistry || globalRegistry self._components.registry = localRegistry || globalRegistry
self.removable_instances = opts.removable_instances
self._deps = { self._deps = {
config: self._components.registry.get('config').api, config: self._components.registry.get('config').api,
compilersartefacts: self._components.registry.get('compilersartefacts').api, compilersartefacts: self._components.registry.get('compilersartefacts').api,

Loading…
Cancel
Save