Merge pull request #2985 from BlueWallet/limpbrains-fix-recieve

FIX: recieve/details screen typo
This commit is contained in:
GLaDOS 2021-04-20 16:01:40 +01:00 committed by GitHub
commit ad931ec3f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,7 +212,7 @@ const ReceiveDetails = () => {
try {
newAddress = await Promise.race([wallet.getAddressAsync(), sleep(1000)]);
} catch (_) {}
if (address === undefined) {
if (newAddress === undefined) {
// either sleep expired or getAddressAsync threw an exception
console.warn('either sleep expired or getAddressAsync threw an exception');
newAddress = wallet._getExternalAddressByIndex(wallet.getNextFreeAddressIndex());
@ -224,7 +224,7 @@ const ReceiveDetails = () => {
await Promise.race([wallet.getAddressAsync(), sleep(1000)]);
newAddress = wallet.getAddress();
} catch (_) {}
if (address === undefined) {
if (newAddress === undefined) {
// either sleep expired or getAddressAsync threw an exception
console.warn('either sleep expired or getAddressAsync threw an exception');
newAddress = wallet.getAddress();