From 687582c6e13703cdc0f6e7b0675026d390b10537 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 6 Feb 2018 11:37:07 -0500 Subject: [PATCH] fix references to udapp variables --- src/universal-dapp-ui.js | 14 +++++++------- src/universal-dapp.js | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/universal-dapp-ui.js b/src/universal-dapp-ui.js index b2f1e769a8..7f31668a02 100644 --- a/src/universal-dapp-ui.js +++ b/src/universal-dapp-ui.js @@ -183,7 +183,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address ${copyToClipboard(() => address)} ` - if (self.removable_instances) { + if (self.udapp.removable_instances) { var close = yo`
` instance.append(close) } @@ -268,9 +268,9 @@ UniversalDAppUI.prototype.getCallButton = function (args) { if (!error) { if (isUserAction) { if (!args.funABI.constant) { - self._api.logMessage(`${logMsg} pending ... `) + self.udapp._api.logMessage(`${logMsg} pending ... `) } else { - self._api.logMessage(`${logMsg}`) + self.udapp._api.logMessage(`${logMsg}`) } } txExecution.callFunction(args.address, data, args.funABI, self, (error, txResult) => { @@ -279,7 +279,7 @@ UniversalDAppUI.prototype.getCallButton = function (args) { if (isVM) { var vmError = txExecution.checkVMError(txResult) if (vmError.error) { - self._api.logMessage(`${logMsg} errored: ${vmError.message} `) + self.udapp._api.logMessage(`${logMsg} errored: ${vmError.message} `) return } } @@ -289,14 +289,14 @@ UniversalDAppUI.prototype.getCallButton = function (args) { outputOverride.appendChild(decoded) } } else { - self._api.logMessage(`${logMsg} errored: ${error} `) + self.udapp._api.logMessage(`${logMsg} errored: ${error} `) } }) } else { - self._api.logMessage(`${logMsg} errored: ${error} `) + self.udapp._api.logMessage(`${logMsg} errored: ${error} `) } }, (msg) => { - self._api.logMessage(msg) + self.udapp._api.logMessage(msg) }) } diff --git a/src/universal-dapp.js b/src/universal-dapp.js index 0ae6552f00..4d5b5792f0 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -25,8 +25,8 @@ function UniversalDAppModel (opts = {}) { self.removable = opts.opt.removable self.removable_instances = opts.opt.removable_instances self.personalMode = opts.opt.personalMode || false - self.contracts - self.transactionContextAPI + // self.contracts + // self.transactionContextAPI executionContext.event.register('contextChanged', this, function (context) { self.reset(self.contracts) })