diff --git a/src/app.js b/src/app.js index 636e3a179c..e81e07f3f7 100644 --- a/src/app.js +++ b/src/app.js @@ -50,7 +50,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' @@ -225,9 +224,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 d64aa01478..d0eba44cb7 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()