also reset UI when reseting udapp

pull/1/head
Iuri Matias 7 years ago
parent 1d4097c534
commit f90dc0b946
  1. 2
      src/app.js
  2. 2
      src/universal-dapp-ui.js

@ -267,6 +267,7 @@ function run () {
var udappUI = new UniversalDAppUI(udapp) var udappUI = new UniversalDAppUI(udapp)
udapp.reset({}, transactionContextAPI) udapp.reset({}, transactionContextAPI)
udappUI.reset()
udapp.event.register('debugRequested', this, function (txResult) { udapp.event.register('debugRequested', this, function (txResult) {
startdebugging(txResult.transactionHash) startdebugging(txResult.transactionHash)
}) })
@ -617,6 +618,7 @@ function run () {
}, },
resetDapp: (contracts) => { resetDapp: (contracts) => {
udapp.reset(contracts, transactionContextAPI) udapp.reset(contracts, transactionContextAPI)
udappUI.reset()
}, },
setOptimize: (optimize, runCompilation) => { setOptimize: (optimize, runCompilation) => {
compiler.setOptimize(optimize) compiler.setOptimize(optimize)

@ -17,7 +17,7 @@ function UniversalDAppUI (udapp, opts = {}) {
self.el = yo`<div class=${css.udapp}></div>` self.el = yo`<div class=${css.udapp}></div>`
} }
UniversalDAppUI.prototype.reset = function (contracts, transactionContextAPI) { UniversalDAppUI.prototype.reset = function () {
this.el.innerHTML = '' this.el.innerHTML = ''
} }

Loading…
Cancel
Save