From 5733833f5e48e7fda9305fe79bb570fd58f1380a Mon Sep 17 00:00:00 2001 From: William O'Beirne Date: Thu, 26 Apr 2018 14:24:28 -0400 Subject: [PATCH] Wallet Selection Optimization (#1680) --- common/components/WalletDecrypt/WalletDecrypt.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/common/components/WalletDecrypt/WalletDecrypt.tsx b/common/components/WalletDecrypt/WalletDecrypt.tsx index 7971aebe..7fbe7489 100644 --- a/common/components/WalletDecrypt/WalletDecrypt.tsx +++ b/common/components/WalletDecrypt/WalletDecrypt.tsx @@ -390,12 +390,14 @@ const WalletDecrypt = withRouter( } let timeout = 0; - const web3Available = await isWeb3NodeAvailable(); - if (wallet.attemptUnlock && web3Available) { - // timeout is only the maximum wait time before secondary view is shown - // send view will be shown immediately on web3 resolve - timeout = 1000; - wallet.unlock(); + if (wallet.attemptUnlock) { + const web3Available = await isWeb3NodeAvailable(); + if (web3Available) { + // timeout is only the maximum wait time before secondary view is shown + // send view will be shown immediately on web3 resolve + timeout = 1500; + wallet.unlock(); + } } window.setTimeout(() => {