From 00ad8ba372da4fce3e9ad8a9f6e81c88f6f5b633 Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Wed, 15 Aug 2018 15:56:42 -0400 Subject: [PATCH] Fix encryption startup 1) remove wallet unlock message (outdated by new modal) 2) removed return which caused status updates to stop + restructured else statements 3) Prevent clicking out from modal (would close app) 4) update yarn.lock with proper redux version --- src/renderer/component/splash/view.jsx | 14 +++----------- src/renderer/modal/modalWalletUnlock/view.jsx | 1 + yarn.lock | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/renderer/component/splash/view.jsx b/src/renderer/component/splash/view.jsx index fd2956853..6fb1be0c8 100644 --- a/src/renderer/component/splash/view.jsx +++ b/src/renderer/component/splash/view.jsx @@ -63,21 +63,15 @@ export class SplashScreen extends React.PureComponent { updateStatusCallback(status) { const { notifyUnlockWallet } = this.props; const { launchedModal } = this.state; - - if (status.wallet.is_locked) { + if (status.wallet && status.wallet.is_locked) { this.setState({ - message: __('Unlock Wallet'), - details: __('Please unlock your wallet to proceed.'), isRunning: true, }); if (launchedModal === false) { this.setState({ launchedModal: true }, () => notifyUnlockWallet()); } - return; - } - - if (status.is_running) { + } else if (status.is_running) { // Wait until we are able to resolve a name before declaring // that we are done. // TODO: This is a hack, and the logic should live in the daemon @@ -95,9 +89,7 @@ export class SplashScreen extends React.PureComponent { } }); return; - } - - if (status.blockchain_headers && status.blockchain_headers.download_progress < 100) { + } else if (status.blockchain_headers && status.blockchain_headers.download_progress < 100) { this.setState({ message: __('Blockchain Sync'), details: `${__('Catching up with the blockchain')} (${ diff --git a/src/renderer/modal/modalWalletUnlock/view.jsx b/src/renderer/modal/modalWalletUnlock/view.jsx index 47c0b400e..1a8085a04 100644 --- a/src/renderer/modal/modalWalletUnlock/view.jsx +++ b/src/renderer/modal/modalWalletUnlock/view.jsx @@ -38,6 +38,7 @@ class ModalWalletUnlock extends React.PureComponent { isOpen contentLabel={__('Unlock Wallet')} type="confirm" + shouldCloseOnOverlayClick={false} confirmButtonLabel={__('Unlock')} abortButtonLabel={__('Exit')} onConfirmed={() => unlockWallet(password)} diff --git a/yarn.lock b/yarn.lock index 688af3e6c..8684ec3eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5651,9 +5651,9 @@ lazy-val@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.3.tgz#bb97b200ef00801d94c317e29dc6ed39e31c5edc" -lbry-redux@lbryio/lbry-redux#f760f59dde7c5304bb4d0edda1de7fcbf7c1b02e: +lbry-redux@lbryio/lbry-redux#ada4880c5d0758c7973aff9d443a87874d98b320: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/f760f59dde7c5304bb4d0edda1de7fcbf7c1b02e" + resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/ada4880c5d0758c7973aff9d443a87874d98b320" dependencies: proxy-polyfill "0.1.6" reselect "^3.0.0" -- 2.45.3