Browse Source

Merge pull request #165 from loeck/master

Reset state in ReceiveBox when address change
master
Loëck Vézien 7 years ago
committed by GitHub
parent
commit
b23b9c6c28
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/components/ReceiveBox.js
  2. 196
      yarn.lock

8
src/components/ReceiveBox.js

@ -82,6 +82,14 @@ class ReceiveBox extends PureComponent<Props, State> {
ipcRenderer.on('msg', this.handleMsgEvent)
}
componentWillReceiveProps(nextProps: Props) {
if (this.props.address !== nextProps.address) {
this.setState({
...defaultState,
})
}
}
componentWillUnmount() {
ipcRenderer.removeListener('msg', this.handleMsgEvent)
this.setState({

196
yarn.lock

@ -581,37 +581,29 @@ anymatch@^2.0.0:
micromatch "^3.1.4"
normalize-path "^2.1.1"
app-builder-bin-linux@1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.3.6.tgz#45344c4b09b3c2febc3a452e8916fa00aa645b62"
app-builder-bin-linux@1.3.7:
version "1.3.7"
resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.3.7.tgz#9eeb28f7f2c9eb91f4dcd02f03e9117b45891cae"
app-builder-bin-mac@1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.3.6.tgz#c7df8f4c349292c789e557a285df2279d05b8201"
app-builder-bin-linux@1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.3.8.tgz#138eaddce970fb485b715e8c3cd88064aee4efb4"
app-builder-bin-mac@1.3.7:
version "1.3.7"
resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.3.7.tgz#43705d9f0c75ef8ac2a07dcf9c31d9c0d3e27770"
app-builder-bin-win@1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.3.6.tgz#b492c0573cfa4206fb9f33756d6ab844e04ce0b8"
app-builder-bin-mac@1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.3.8.tgz#ca7fa326ffeea0eb70cbdce1715ebb27b2ebb7a2"
app-builder-bin-win@1.3.7:
version "1.3.7"
resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.3.7.tgz#f5ddef00b0822885fd376f4323aa48c14a5788bf"
app-builder-bin@1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-1.3.6.tgz#fbc49a3b74917f5e23632c71ea1a3ea9b083424e"
optionalDependencies:
app-builder-bin-linux "1.3.6"
app-builder-bin-mac "1.3.6"
app-builder-bin-win "1.3.6"
app-builder-bin-win@1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.3.8.tgz#5f48cbe5ca9b200a11b7f786c7de486b53543df9"
app-builder-bin@1.3.7:
version "1.3.7"
@ -621,6 +613,14 @@ app-builder-bin@1.3.7:
app-builder-bin-mac "1.3.7"
app-builder-bin-win "1.3.7"
app-builder-bin@1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-1.3.8.tgz#f0f2f41d5fa30aad7b2543d7263d2139c8a918ec"
optionalDependencies:
app-builder-bin-linux "1.3.8"
app-builder-bin-mac "1.3.8"
app-builder-bin-win "1.3.8"
app-root-path@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46"
@ -2181,12 +2181,12 @@ builder-util-runtime@4.0.5, builder-util-runtime@^4.0.5, builder-util-runtime@~4
fs-extra-p "^4.5.0"
sax "^1.2.4"
builder-util@5.3.1, builder-util@^5.3.0:
version "5.3.1"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-5.3.1.tgz#e90831153268803962b2a96afcba31dfa4223c39"
builder-util@5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-5.4.0.tgz#77de5715e2cc624856a3c3b51d0e60a0c4bbe165"
dependencies:
"7zip-bin" "~3.1.0"
app-builder-bin "1.3.6"
app-builder-bin "1.3.7"
bluebird-lst "^1.0.5"
builder-util-runtime "^4.0.5"
chalk "^2.3.0"
@ -2200,12 +2200,12 @@ builder-util@5.3.1, builder-util@^5.3.0:
stat-mode "^0.2.2"
temp-file "^3.1.1"
builder-util@5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-5.4.0.tgz#77de5715e2cc624856a3c3b51d0e60a0c4bbe165"
builder-util@5.4.1, builder-util@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-5.4.1.tgz#a387252162bca5a54e8ed979f2a45a63fc3d7b42"
dependencies:
"7zip-bin" "~3.1.0"
app-builder-bin "1.3.7"
app-builder-bin "1.3.8"
bluebird-lst "^1.0.5"
builder-util-runtime "^4.0.5"
chalk "^2.3.0"
@ -2936,8 +2936,8 @@ css-in-js-utils@^2.0.0:
hyphenate-style-name "^1.0.2"
css-loader@^0.28.8, css-loader@^0.28.9:
version "0.28.9"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.9.tgz#68064b85f4e271d7ce4c48a58300928e535d1c95"
version "0.28.10"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.10.tgz#40282e79230f7bcb4e483efa631d670b735ebf42"
dependencies:
babel-code-frame "^6.26.0"
css-selector-tokenizer "^0.7.0"
@ -3478,14 +3478,14 @@ electron-builder-lib@20.0.8:
temp-file "^3.1.1"
electron-builder-lib@~20.0.5:
version "20.0.7"
resolved "https://registry.yarnpkg.com/electron-builder-lib/-/electron-builder-lib-20.0.7.tgz#d9925bb326f9db081586058bc4ff78bf2145b4be"
version "20.0.9"
resolved "https://registry.yarnpkg.com/electron-builder-lib/-/electron-builder-lib-20.0.9.tgz#62d06eb8536ee6d85f82f9416c6e452dffa4734f"
dependencies:
"7zip-bin" "~3.1.0"
app-builder-bin "1.3.6"
app-builder-bin "1.3.8"
async-exit-hook "^2.0.1"
bluebird-lst "^1.0.5"
builder-util "5.3.1"
builder-util "5.4.1"
builder-util-runtime "4.0.5"
chromium-pickle-js "^0.2.0"
debug "^3.1.0"
@ -3596,8 +3596,8 @@ electron-store@^1.3.0:
conf "^1.3.0"
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
version "1.3.33"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz#bf00703d62a7c65238136578c352d6c5c042a545"
version "1.3.34"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.34.tgz#d93498f40391bb0c16a603d8241b9951404157ed"
electron-updater@^2.20.1:
version "2.20.1"
@ -3889,8 +3889,8 @@ eslint-module-utils@^2.1.1:
pkg-dir "^1.0.0"
eslint-plugin-flowtype@^2.46.0:
version "2.46.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.46.0.tgz#832e2f6cc75ea33a25b801b6b87f0342f372b362"
version "2.46.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.46.1.tgz#c4f81d580cd89c82bc3a85a1ccf4ae3a915143a4"
dependencies:
lodash "^4.15.0"
@ -4306,8 +4306,8 @@ file-entry-cache@^2.0.0:
object-assign "^4.0.1"
file-loader@^1.1.6, file-loader@^1.1.7:
version "1.1.7"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.7.tgz#0a3ad0fe81695feeed6f2dac324fce500c30f0a0"
version "1.1.9"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.9.tgz#cf152aedbcfb3d67038d0845efb7cf11a96e53de"
dependencies:
loader-utils "^1.0.2"
schema-utils "^0.4.5"
@ -5634,20 +5634,20 @@ isurl@^1.0.0-alpha5:
has-to-string-tag-x "^1.2.0"
is-object "^1.0.1"
jest-config@^22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.0.tgz#34ab50ff52e68a3b0f2dd5df91bfd9b8cf2aa474"
jest-config@^22.4.2:
version "22.4.2"
resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.2.tgz#580ba5819bf81a5e48f4fd470e8b81834f45c855"
dependencies:
chalk "^2.0.1"
glob "^7.1.1"
jest-environment-jsdom "^22.4.0"
jest-environment-node "^22.4.0"
jest-environment-jsdom "^22.4.1"
jest-environment-node "^22.4.1"
jest-get-type "^22.1.0"
jest-jasmine2 "^22.4.0"
jest-jasmine2 "^22.4.2"
jest-regex-util "^22.1.0"
jest-resolve "^22.4.0"
jest-util "^22.4.0"
jest-validate "^22.4.0"
jest-resolve "^22.4.2"
jest-util "^22.4.1"
jest-validate "^22.4.2"
pretty-format "^22.4.0"
jest-diff@^22.4.0:
@ -5659,30 +5659,29 @@ jest-diff@^22.4.0:
jest-get-type "^22.1.0"
pretty-format "^22.4.0"
jest-environment-jsdom@^22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.0.tgz#09df84a1faf1ca47096aafc89411a095378f628e"
jest-environment-jsdom@^22.4.1:
version "22.4.1"
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.1.tgz#754f408872441740100d3917e5ec40c74de6447f"
dependencies:
jest-mock "^22.2.0"
jest-util "^22.4.0"
jest-util "^22.4.1"
jsdom "^11.5.1"
jest-environment-node@^22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.0.tgz#b6d9458275053028d4b1658851c3475ab22dfb56"
jest-environment-node@^22.4.1:
version "22.4.1"
resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.1.tgz#418850eb654596b8d6e36c2021cbedbc23df8e16"
dependencies:
jest-mock "^22.2.0"
jest-util "^22.4.0"
jest-util "^22.4.1"
jest-get-type@^22.1.0:
version "22.1.0"
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9"
jest-jasmine2@^22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.0.tgz#1d9b607ede12a600ecadda2c8d89918d7d3c4d26"
jest-jasmine2@^22.4.2:
version "22.4.2"
resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.2.tgz#dfd3d259579ed6f52510d8f1ab692808f0d40691"
dependencies:
callsites "^2.0.0"
chalk "^2.0.1"
co "^4.6.0"
expect "^22.4.0"
@ -5692,6 +5691,7 @@ jest-jasmine2@^22.4.0:
jest-matcher-utils "^22.4.0"
jest-message-util "^22.4.0"
jest-snapshot "^22.4.0"
jest-util "^22.4.1"
source-map-support "^0.5.0"
jest-matcher-utils@^22.4.0:
@ -5720,9 +5720,9 @@ jest-regex-util@^22.1.0:
version "22.1.0"
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53"
jest-resolve@^22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.0.tgz#c3550280d77c47c2885809e7dc8e42560f0b3e71"
jest-resolve@^22.4.2:
version "22.4.2"
resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.2.tgz#25d88aa4147462c9c1c6a1ba16250d3794c24d00"
dependencies:
browser-resolve "^1.11.2"
chalk "^2.0.1"
@ -5738,9 +5738,9 @@ jest-snapshot@^22.4.0:
natural-compare "^1.4.0"
pretty-format "^22.4.0"
jest-util@^22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.0.tgz#ebdc147548d613c5faf7c7534051f59740c98ada"
jest-util@^22.4.1:
version "22.4.1"
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.1.tgz#dd17c3bdb067f8e90591563ec0c42bf847dc249f"
dependencies:
callsites "^2.0.0"
chalk "^2.0.1"
@ -5748,13 +5748,14 @@ jest-util@^22.4.0:
is-ci "^1.0.10"
jest-message-util "^22.4.0"
mkdirp "^0.5.1"
source-map "^0.6.0"
jest-validate@^22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.0.tgz#8bcbeaf7ac6893c90446daf0d9382b6de0651799"
jest-validate@^22.4.0, jest-validate@^22.4.2:
version "22.4.2"
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.2.tgz#e789a4e056173bf97fe797a2df2d52105c57d4f4"
dependencies:
chalk "^2.0.1"
jest-config "^22.4.0"
jest-config "^22.4.2"
jest-get-type "^22.1.0"
leven "^2.1.0"
pretty-format "^22.4.0"
@ -5903,8 +5904,8 @@ jsprim@^1.2.2:
verror "1.10.0"
jsqr@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/jsqr/-/jsqr-1.0.1.tgz#254994e6513bf23ba9ce10578fe6f6781f7f01de"
version "1.0.2"
resolved "https://registry.yarnpkg.com/jsqr/-/jsqr-1.0.2.tgz#39081e5e7469318284bfe1b00d72db61c87c151b"
jsx-ast-utils@^2.0.0, jsx-ast-utils@^2.0.1:
version "2.0.1"
@ -6300,8 +6301,8 @@ markdown-loader@^2.0.1:
marked "^0.3.9"
marked@^0.3.9:
version "0.3.15"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.15.tgz#de96982e54c880962f5093a2fa93d0866bf73668"
version "0.3.16"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.16.tgz#2f188b7dfcfa6540fe9940adaf0f3b791c9a5cba"
"match-stream@>= 0.0.2 < 1":
version "0.0.2"
@ -6395,25 +6396,7 @@ micromatch@^2.1.5, micromatch@^2.3.11:
parse-glob "^3.0.4"
regex-cache "^0.4.2"
micromatch@^3.1.4:
version "3.1.6"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.6.tgz#8d7c043b48156f408ca07a4715182b79b99420bf"
dependencies:
arr-diff "^4.0.0"
array-unique "^0.3.2"
braces "^2.3.1"
define-property "^2.0.2"
extend-shallow "^3.0.2"
extglob "^2.0.4"
fragment-cache "^0.2.1"
kind-of "^6.0.2"
nanomatch "^1.2.9"
object.pick "^1.3.0"
regex-not "^1.0.0"
snapdragon "^0.8.1"
to-regex "^3.0.1"
micromatch@^3.1.8:
micromatch@^3.1.4, micromatch@^3.1.8:
version "3.1.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.8.tgz#5c8caa008de588eebb395e8c0ad12c128f25fff1"
dependencies:
@ -6565,8 +6548,8 @@ mute-stream@0.0.7:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
nan@^2.3.0, nan@^2.6.2:
version "2.8.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a"
version "2.9.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.9.2.tgz#f564d75f5f8f36a6d9456cca7a6c4fe488ab7866"
nanomatch@^1.2.9:
version "1.2.9"
@ -7923,8 +7906,8 @@ react-inspector@^2.2.2:
is-dom "^1.0.9"
react-modal@^3.1.10:
version "3.2.1"
resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.2.1.tgz#fa8f76aed55b67c22dcf1a1c15b05c8d11f18afe"
version "3.3.1"
resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.3.1.tgz#7355db196482da0c7fa1cbecccf2bdd9bc366b14"
dependencies:
exenv "^1.2.0"
prop-types "^15.5.10"
@ -9216,8 +9199,8 @@ styled-components@^3.1.6:
supports-color "^3.2.3"
styled-system@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/styled-system/-/styled-system-2.1.0.tgz#dd5a8f863c962e0aaf054443f05b6d7aa0b4dc31"
version "2.1.1"
resolved "https://registry.yarnpkg.com/styled-system/-/styled-system-2.1.1.tgz#ec7cd9c25f8413662c90a3ff1b6660cf8d744163"
dependencies:
prop-types "^15.6.0"
@ -9551,8 +9534,8 @@ uglify-es@^3.3.4:
source-map "~0.6.1"
uglify-js@3.3.x:
version "3.3.11"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.11.tgz#e9d058b20715138bb4e8e5cae2ea581686bdaae3"
version "3.3.12"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.12.tgz#efd87c16a1f4c674a8a5ede571001ef634dcc883"
dependencies:
commander "~2.14.1"
source-map "~0.6.1"
@ -9595,10 +9578,6 @@ uid-number@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
ultron@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
union-value@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
@ -9931,10 +9910,10 @@ webpack-hot-middleware@^2.21.0:
strip-ansi "^3.0.0"
webpack-merge@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.1.tgz#f1197a0a973e69c6fbeeb6d658219aa8c0c13555"
version "4.1.2"
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.2.tgz#5d372dddd3e1e5f8874f5bf5a8e929db09feb216"
dependencies:
lodash "^4.17.4"
lodash "^4.17.5"
webpack-sources@1.0.1, webpack-sources@^1.0.1, webpack-sources@^1.1.0:
version "1.0.1"
@ -10110,12 +10089,11 @@ write@^0.2.1:
mkdirp "^0.5.1"
ws@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-4.0.0.tgz#bfe1da4c08eeb9780b986e0e4d10eccd7345999f"
version "4.1.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289"
dependencies:
async-limiter "~1.0.0"
safe-buffer "~5.1.0"
ultron "~1.1.0"
xdg-basedir@^3.0.0:
version "3.0.0"

Loading…
Cancel
Save