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; let timeout = 0;
const web3Available = await isWeb3NodeAvailable(); if (wallet.attemptUnlock) {
if (wallet.attemptUnlock && web3Available) { const web3Available = await isWeb3NodeAvailable();
// timeout is only the maximum wait time before secondary view is shown if (web3Available) {
// send view will be shown immediately on web3 resolve // timeout is only the maximum wait time before secondary view is shown
timeout = 1000; // send view will be shown immediately on web3 resolve
wallet.unlock(); timeout = 1500;
wallet.unlock();
}
} }
window.setTimeout(() => { window.setTimeout(() => {