xmr/wow address check null error fix

This commit is contained in:
julian 2024-01-16 18:41:55 -06:00
parent fb937ebddf
commit ec52612f61

View file

@ -335,13 +335,15 @@ mixin CwBasedInterface<T extends CryptonoteCurrency> on CryptonoteWallet<T>
Future<void> checkReceivingAddressForTransactions() async { Future<void> checkReceivingAddressForTransactions() async {
try { try {
int highestIndex = -1; int highestIndex = -1;
for (var element final entries = cwWalletBase?.transactionHistory?.transactions?.entries;
in cwWalletBase!.transactionHistory!.transactions!.entries) { if (entries != null) {
if (element.value.direction == TransactionDirection.incoming) { for (final element in entries) {
int curAddressIndex = if (element.value.direction == TransactionDirection.incoming) {
element.value.additionalInfo!['addressIndex'] as int; int curAddressIndex =
if (curAddressIndex > highestIndex) { element.value.additionalInfo!['addressIndex'] as int;
highestIndex = curAddressIndex; if (curAddressIndex > highestIndex) {
highestIndex = curAddressIndex;
}
} }
} }
} }