remove compiler dependency from udapp

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent 16a5f48930
commit 2171bd84c4
  1. 7
      src/universal-dapp-ui.js
  2. 3
      src/universal-dapp.js

@ -24,6 +24,11 @@ var TreeView = require('./app/ui/TreeView')
function UniversalDAppUI (udapp, registry) {
this.udapp = udapp
this.registry = registry
this.compilerData = {contractsDetails: {}}
registry.get('compiler').api.event.register('compilationFinished', (success, data, source) => {
this.compilerData.contractsDetails = success && data ? data.contracts : {}
})
}
function decodeResponseToTreeView (response, fnabi) {
@ -215,7 +220,7 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
}
// contractsDetails is used to resolve libraries
txFormat.buildData(args.contractName, args.contractAbi, self.udapp.data.contractsDetails, false, args.funABI, args.funABI.type !== 'fallback' ? value : '', (error, data) => {
txFormat.buildData(args.contractName, args.contractAbi, self.compilerData.contractsDetails, false, args.funABI, args.funABI.type !== 'fallback' ? value : '', (error, data) => {
if (!error) {
if (!args.funABI.constant) {
self.registry.logCallback(`${logMsg} pending ... `)

@ -10,7 +10,8 @@ var executionContext = remixLib.execution.executionContext
function UniversalDApp (globalRegistry, config) {
this.event = new EventManager()
this._deps = {
var self = this
self._deps = {
config: globalRegistry.get('config').api,
compiler: globalRegistry.get('compiler').api
}

Loading…
Cancel
Save