From fcf8e366739da1fd4db4bdc5623e74af64994da2 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 31 Dec 2019 11:38:19 -0500 Subject: [PATCH] move udapp reference to blockchain class --- src/app.js | 5 +---- src/app/tabs/runTab/model/blockchain.js | 7 +++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app.js b/src/app.js index a55b18d4bd..67b6b5ad79 100644 --- a/src/app.js +++ b/src/app.js @@ -51,7 +51,6 @@ import { HiddenPanel } from './app/components/hidden-panel' import { VerticalIcons } from './app/components/vertical-icons' import { LandingPage } from './app/ui/landing-page/landing-page' import { MainPanel } from './app/components/main-panel' -import { UniversalDApp } from 'remix-lib' import migrateFileSystem from './migrateFileSystem' @@ -226,9 +225,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org const fileManager = new FileManager(editor) registry.put({api: fileManager, name: 'filemanager'}) - // ----------------- universal dapp: run transaction, listen on transactions, decode events - const udapp = new UniversalDApp(registry.get('config').api, executionContext) - const blockchain = new Blockchain(executionContext, udapp) + const blockchain = new Blockchain(registry.get('config').api, executionContext) // ----------------- compilation metadata generation servive ---------------------------- const compilerMetadataGenerator = new CompilerMetadata(blockchain, fileManager, registry.get('config').api) diff --git a/src/app/tabs/runTab/model/blockchain.js b/src/app/tabs/runTab/model/blockchain.js index 9124d0b2fa..19b15d4303 100644 --- a/src/app/tabs/runTab/model/blockchain.js +++ b/src/app/tabs/runTab/model/blockchain.js @@ -8,12 +8,15 @@ const ethJSUtil = require('ethereumjs-util') const Personal = require('web3-eth-personal') const Web3 = require('web3') +import { UniversalDApp } from 'remix-lib' + class Blockchain { - constructor (executionContext, udapp) { + // NOTE: the config object will need to be refactored out in remix-lib + constructor (config, executionContext) { this.event = new EventManager() this.executionContext = executionContext - this.udapp = udapp + this.udapp = new UniversalDApp(config, this.executionContext) this.networkcallid = 0 this.setupEvents()