From 5ccec23469f56c61b0daf1211dad5453d5292378 Mon Sep 17 00:00:00 2001 From: Luca Zeug Date: Tue, 17 Jan 2017 20:35:26 +0100 Subject: [PATCH] update dependency and fix ESLint --- modules/ipcCommunicator.js | 15 ++++++++------- package.json | 2 +- yarn.lock | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/ipcCommunicator.js b/modules/ipcCommunicator.js index 9a58b93b0..8f3eab8c7 100644 --- a/modules/ipcCommunicator.js +++ b/modules/ipcCommunicator.js @@ -178,8 +178,8 @@ ipc.on('backendAction_importWalletFile', (e, path, pw) => { error = true; e.sender.send('uiAction_importedWalletFile', 'Couldn\'t start the "geth wallet import " process.'); }); - nodeProcess.stdout.on('data', (data) => { - data = data.toString(); + nodeProcess.stdout.on('data', (_data) => { + const data = _data.toString(); if (data) { log.info('Imported presale: ', data); } @@ -189,11 +189,12 @@ ipc.on('backendAction_importWalletFile', (e, path, pw) => { // if imported, return the address } else if (data.indexOf('Address:') !== -1) { - var find = data.match(/\{([a-f0-9]+)\}/i); - if (find.length && find[1]) - e.sender.send('uiAction_importedWalletFile', null, '0x' + find[1]); - else + const find = data.match(/\{([a-f0-9]+)\}/i); + if (find.length && find[1]) { + e.sender.send('uiAction_importedWalletFile', null, `0x${find[1]}`); + } else { e.sender.send('uiAction_importedWalletFile', data); + } // if not stop, so we don't kill the process } else { @@ -209,7 +210,7 @@ ipc.on('backendAction_importWalletFile', (e, path, pw) => { setTimeout(() => { if (!error) { nodeProcess.stdin.write(`${pw}\n`); - pw = null; + pw = null; // eslint-disable-line no-param-reassign } }, 2000); }); diff --git a/package.json b/package.json index 01d56387c..e68edf035 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "bluebird": "^3.3.5", "electron-squirrel-startup": "^1.0.0", "ethereum-client-binaries": "^1.6.1", - "ethereum-keyfile-recognizer": "^1.0.1", + "ethereum-keyfile-recognizer": "^1.0.2", "ethereumjs-abi": "^0.6.3", "got": "^6.3.0", "i18next": "^2.3.4", diff --git a/yarn.lock b/yarn.lock index efa3ec7c9..e51c54dab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1318,7 +1318,7 @@ ethereum-client-binaries@^1.6.1: node-unzip-2 "^0.2.1" tmp "0.0.29" -ethereum-keyfile-recognizer@^1.0.1: +ethereum-keyfile-recognizer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/ethereum-keyfile-recognizer/-/ethereum-keyfile-recognizer-1.0.2.tgz#c0315f91c77e076621e9f6b5f8099fd370f7a11d" dependencies: