diff --git a/electron/cli/index.js b/electron/cli/index.js index 7b88f5b3c..41caeb0b6 100644 --- a/electron/cli/index.js +++ b/electron/cli/index.js @@ -3,11 +3,12 @@ // // SPDX-License-Identifier: MIT -// eslint-disable-next-line +/* eslint-disable */ const dynamicRequire = typeof __non_webpack_require__ === 'undefined' ? require : __non_webpack_require__; // Dynamic require https://github.com/yargs/yargs/issues/781 +/* eslint-enable */ const { app } = require('electron'); const fs = require('fs'); diff --git a/electron/index.js b/electron/index.js index b264838ff..d559aa304 100644 --- a/electron/index.js +++ b/electron/index.js @@ -21,7 +21,7 @@ let mainWindow; // Get arguments from cli const [argv] = cli(); -function createWindow() { +function createWindow () { // If cli() returns false, then it means that the arguments are stopping the // app (e.g. --help or --version). We don't do anything more in this case. if (!argv) { @@ -67,7 +67,7 @@ function createWindow() { }, (details, callback) => { details.requestHeaders.Origin = `parity://${mainWindow.id}.ui.parity`; - callback({ requestHeaders: details.requestHeaders }); + callback({ requestHeaders: details.requestHeaders }); // eslint-disable-line } ); diff --git a/electron/menu/index.js b/electron/menu/index.js index 0d5d7846e..fb08a2efc 100644 --- a/electron/menu/index.js +++ b/electron/menu/index.js @@ -44,7 +44,7 @@ module.exports = mainWindow => { submenu: [ { label: 'Learn More', - click() { + click () { shell.openExternal('https://parity.io'); } } diff --git a/electron/messages/index.js b/electron/messages/index.js index b9fd367c0..275a8d085 100644 --- a/electron/messages/index.js +++ b/electron/messages/index.js @@ -3,7 +3,6 @@ // // SPDX-License-Identifier: MIT -const { runParity } = require('../operations/runParity'); const signerNewToken = require('../operations/signerNewToken'); /** diff --git a/electron/operations/fetchParity.js b/electron/operations/fetchParity.js index 5f853b033..9e726c704 100644 --- a/electron/operations/fetchParity.js +++ b/electron/operations/fetchParity.js @@ -3,7 +3,7 @@ // // SPDX-License-Identifier: MIT -const { app, dialog } = require('electron'); +const { app } = require('electron'); const axios = require('axios'); const { download } = require('electron-dl'); const fs = require('fs'); @@ -15,7 +15,6 @@ const { } = require('../../package.json'); const parityPath = require('../utils/parityPath'); -const fsExists = util.promisify(fs.stat); const fsChmod = util.promisify(fs.chmod); const getArch = () => { diff --git a/electron/operations/handleError.js b/electron/operations/handleError.js index 7c85d4fa6..e5bcc5539 100644 --- a/electron/operations/handleError.js +++ b/electron/operations/handleError.js @@ -3,11 +3,12 @@ // // SPDX-License-Identifier: MIT -const { dialog } = require('electron'); +const { app, dialog } = require('electron'); const { parity: { channel } } = require('../../package.json'); +const parityPath = require('../utils/parityPath'); module.exports = (err, message = 'An error occurred.') => { console.error(err); diff --git a/electron/operations/runParity.js b/electron/operations/runParity.js index bbf6021c1..8e0767491 100644 --- a/electron/operations/runParity.js +++ b/electron/operations/runParity.js @@ -3,7 +3,6 @@ // // SPDX-License-Identifier: MIT -const { app, dialog, webContents } = require('electron'); const flatten = require('lodash/flatten'); const fs = require('fs'); const { spawn } = require('child_process'); @@ -21,7 +20,7 @@ const fsUnlink = util.promisify(fs.unlink); let parity = null; // Will hold the running parity instance module.exports = { - runParity(mainWindow) { + runParity (mainWindow) { // Create a logStream to save logs const logFile = `${parityPath()}.log`; @@ -72,7 +71,7 @@ module.exports = { handleError(err, 'An error occured while running parity.'); }); }, - killParity() { + killParity () { if (parity) { console.log('Stopping parity.'); parity.kill(); diff --git a/package.json b/package.json index d8af35c95..1a4472732 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "build-electron": "webpack --config electron/webpack.config.js", "build-js": "react-app-rewired build", "electron": "npm run build && electron build/electron.js", - "lint": "semistandard 'src/**/*.js' --parser babel-eslint", + "lint": "semistandard 'src/**/*.js' 'electron/**/*.js' --parser babel-eslint", "prebuild": "rimraf build/", "start": "npm-run-all -p watch-css start-js", "start-electron": "electron electron/ --ui-dev --ws-origins all", diff --git a/src/App/App.js b/src/App/App.js index a8a464b80..795d191e8 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -12,6 +12,7 @@ import ProtectedRoute from './ProtectedRoute'; import Receive from '../Receive'; import Send from '../Send'; import Settings from '../Settings'; +import Signer from '../Signer'; import Tokens from '../Tokens'; import './App.css'; @@ -36,11 +37,15 @@ class App extends Component { +