Wallet Selection Optimization (#1680)

This commit is contained in:
William O'Beirne 2018-04-26 14:24:28 -04:00 committed by Daniel Ternyak
parent 4f6dde23c0
commit 5733833f5e
1 changed files with 8 additions and 6 deletions

View File

@ -390,12 +390,14 @@ const WalletDecrypt = withRouter<Props>(
}
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(() => {