From 50e7bb9d7ad47c6f92a2af95a83e5ed78c664f5f Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 29 Mar 2018 13:57:43 +0200 Subject: [PATCH] remove udapp && udappUI --- src/app.js | 7 +------ src/app/tabs/run-tab.js | 22 +++++++++++----------- src/recorder.js | 5 +++-- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/app.js b/src/app.js index 180dcdbde3..c70d41007e 100644 --- a/src/app.js +++ b/src/app.js @@ -716,12 +716,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org visitContracts: (cb) => { compiler.visitContracts(cb) }, - udapp: () => { - return udapp - }, - udappUI: () => { - return udappUI - }, switchFile: function (path) { fileManager.switchFile(path) }, @@ -775,6 +769,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org var rhpOpts = { pluginAPI: new PluginAPI(self, compiler), udapp: udapp, + udappUI: udappUI, compiler: compiler, renderer: renderer } diff --git a/src/app/tabs/run-tab.js b/src/app/tabs/run-tab.js index 8eaacafa8f..6efe21e5aa 100644 --- a/src/app/tabs/run-tab.js +++ b/src/app/tabs/run-tab.js @@ -55,7 +55,7 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) { // PENDING transactions function updatePendingTxs (container, appAPI) { - var pendingCount = Object.keys(appAPI.udapp().pendingTransactions()).length + var pendingCount = Object.keys(opts.udapp.pendingTransactions()).length pendingTxsText.innerText = pendingCount + ' pending transactions' } @@ -90,7 +90,7 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) { executionContext.event.register('contextChanged', (context, silent) => { setFinalContext() }) - fillAccountsList(appAPI, el) + fillAccountsList(appAPI, opts, el) setInterval(() => { updateAccountBalances(container, appAPI) updatePendingTxs(container, appAPI) @@ -104,10 +104,10 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) { return { render () { return container } } } -function fillAccountsList (appAPI, container) { +function fillAccountsList (appAPI, opts, container) { var $txOrigin = $(container.querySelector('#txorigin')) $txOrigin.empty() - appAPI.udapp().getAccounts((err, accounts) => { + opts.udapp.getAccounts((err, accounts) => { if (err) { addTooltip(`Cannot get account list: ${err}`) } if (accounts && accounts[0]) { for (var a in accounts) { $txOrigin.append($('