From d71c9a51afdb3550b79f816df227cc9246b10220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=ABck=20V=C3=A9zien?= Date: Thu, 18 Jan 2018 11:20:15 +0100 Subject: [PATCH] Set defaultState on IsUnlocked, update dependencies --- package.json | 2 +- src/components/IsUnlocked/index.js | 14 ++++++++++---- yarn.lock | 10 +++++----- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index e5fa53f4..b9dce89e 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "color": "^2.0.1", "downshift": "^1.25.0", "electron-store": "^1.3.0", - "electron-updater": "^2.18.2", + "electron-updater": "^2.19.1", "fuse.js": "^3.2.0", "history": "^4.7.2", "i18next": "^10.2.2", diff --git a/src/components/IsUnlocked/index.js b/src/components/IsUnlocked/index.js index 036c591b..a5729568 100644 --- a/src/components/IsUnlocked/index.js +++ b/src/components/IsUnlocked/index.js @@ -42,11 +42,15 @@ const mapDispatchToProps = { unlock, } +const defaultState = { + inputValue: { + password: '', + }, +} + class IsUnlocked extends PureComponent { state = { - inputValue: { - password: '', - }, + ...defaultState, } handleChangeInput = (key: $Keys) => (value: $Values) => @@ -68,7 +72,9 @@ class IsUnlocked extends PureComponent { fetchAccounts() unlock() - this.handleChangeInput('password')('') + this.setState({ + ...defaultState, + }) } } diff --git a/yarn.lock b/yarn.lock index 8e88f6c4..0c16cfbb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1920,7 +1920,7 @@ buffers@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb" -builder-util-runtime@4.0.2, builder-util-runtime@^4.0.2, builder-util-runtime@~4.0.0: +builder-util-runtime@4.0.2, builder-util-runtime@^4.0.2, builder-util-runtime@~4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-4.0.2.tgz#673f1a0f2e275e6f80a16ce57225589a003c9a52" dependencies: @@ -3173,12 +3173,12 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: dependencies: electron-releases "^2.1.0" -electron-updater@^2.18.2: - version "2.18.2" - resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-2.18.2.tgz#776b50389b849535425e9e2893d7943ee61e8e3f" +electron-updater@^2.19.1: + version "2.19.1" + resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-2.19.1.tgz#2265136b7ef15f7cb06e4032eaaf64382f642437" dependencies: bluebird-lst "^1.0.5" - builder-util-runtime "~4.0.0" + builder-util-runtime "~4.0.2" electron-is-dev "^0.3.0" fs-extra-p "^4.5.0" js-yaml "^3.10.0"