diff --git a/src/app.js b/src/app.js index 4fc93f3c3d..c3c5694e1a 100644 --- a/src/app.js +++ b/src/app.js @@ -488,7 +488,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org // The event listener needs to be registered as early as possible, because the // parent will send the message upon the "load" event. let filesToLoad = null - const loadFilesCallback = function (files) { filesToLoad = files } // will be replaced later + let loadFilesCallback = function (files) { filesToLoad = files } // will be replaced later window.addEventListener('message', function (ev) { if (typeof ev.data === typeof [] && ev.data[0] === 'loadFiles') { diff --git a/src/app/files/browser-files-tree.js b/src/app/files/browser-files-tree.js index 12e7f1cbc3..34df82b5db 100644 --- a/src/app/files/browser-files-tree.js +++ b/src/app/files/browser-files-tree.js @@ -4,13 +4,13 @@ var EventManager = require('../../lib/events') import { BaseApi } from 'remix-plugin' - class FilesTree extends BaseApi { - +class FilesTree extends BaseApi { constructor (name, storage) { super({ name: name, methods: ['get', 'set', 'remove'], - description: 'service - read/write file to the `config` explorer without need of additionnal permission.' + description: + 'service - read/write file to the `config` explorer without need of additionnal permission.' }) this.event = new EventManager() this.storage = storage @@ -109,7 +109,11 @@ import { BaseApi } from 'remix-plugin' if (!this.storage.rename(unprefixedoldPath, unprefixednewPath)) { return false } - this.event.trigger('fileRenamed', [this.type + '/' + unprefixedoldPath, this.type + '/' + unprefixednewPath, isFolder]) + this.event.trigger('fileRenamed', [ + this.type + '/' + unprefixedoldPath, + this.type + '/' + unprefixednewPath, + isFolder + ]) return true } return false @@ -117,7 +121,7 @@ import { BaseApi } from 'remix-plugin' resolveDirectory (path, callback) { if (path[0] === '/') path = path.substring(1) - if (!path) return callback(null, { [this.type]: { } }) + if (!path) return callback(null, { [this.type]: {} }) var tree = {} path = this.removePrefix(path) @@ -138,7 +142,6 @@ import { BaseApi } from 'remix-plugin' if (path[0] === '/') return path.substring(1) return path } - } module.exports = FilesTree diff --git a/src/universal-dapp.js b/src/universal-dapp.js index 0cbd80a604..ca8ab12a5b 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -8,18 +8,15 @@ var txHelper = remixLib.execution.txHelper var EventManager = remixLib.EventManager var executionContext = remixLib.execution.executionContext import { UdappApi } from 'remix-plugin' -import { EventEmitter } from 'events'; +import { EventEmitter } from 'events' const profile = { name: 'udapp', displayName: 'universal dapp', - events: ['newTransaction'], - methods: ['sendTransaction', 'getAccounts', 'createVMAccount'], description: 'service - run transaction and access account', permission: true } - module.exports = class UniversalDApp extends UdappApi { constructor (registry) {