Merge pull request #3724 from BlueWallet/crash

FIX: Address list would crash on lack of item
This commit is contained in:
GLaDOS 2021-08-31 12:22:50 +01:00 committed by GitHub
commit 44a3eacda4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,11 +19,11 @@ export const getAddress = (wallet, index, isInternal) => {
if (isInternal) {
address = wallet._getInternalAddressByIndex(index);
balance = totalBalance(wallet._balances_by_internal_index[index]);
transactions = wallet._txs_by_internal_index[index].length;
transactions = wallet._txs_by_internal_index[index]?.length;
} else {
address = wallet._getExternalAddressByIndex(index);
balance = totalBalance(wallet._balances_by_external_index[index]);
transactions = wallet._txs_by_external_index[index].length;
transactions = wallet._txs_by_external_index[index]?.length;
}
return {