diff --git a/electron/cli/index.js b/electron/cli/index.js index 7b88f5b3ce66d468111652c4adf5df76908dc1bf..41caeb0b63d18287696f8d2adc30eaae01990fe7 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 b264838ff5d8606fcd336369a68cfad290144f19..d559aa304811055c8584502a095372d23dc6c39b 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 0d5d7846e10802300043121bd1904e32a5ea2097..fb08a2efc80729301d94955fe1098b5a35c34e7f 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 b9fd367c00c0f142dda85ba0872a8dca45e9126a..275a8d0852682eafe12e771f701559e50e161c00 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 5f853b033c163a078bdc3605daad1a0e8c8ade4a..9e726c704343c067322e60be8432d16ba1cc82fe 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 7c85d4fa6ba6b3a86c6bd7aeaa2353b21c18bcea..e5bcc553963faa9b77b0996a2175de48d6f60bec 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 bbf6021c182d0a7e292962d36021f0d33974eab5..8e07674910346a1690aa93ffef01318c53190b93 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 d8af35c95103cc01ec374b84822a20723bc2e365..1a44727328805503bce94a36a9444701d9f779da 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 a8a464b80d60c0b4bbcb2a054efd96c051be3b7f..795d191e8861c0c642afed2b72af7e2e06b049ed 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 { +