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,8 +335,9 @@ mixin CwBasedInterface<T extends CryptonoteCurrency> on CryptonoteWallet<T>
Future<void> checkReceivingAddressForTransactions() async {
try {
int highestIndex = -1;
for (var element
in cwWalletBase!.transactionHistory!.transactions!.entries) {
final entries = cwWalletBase?.transactionHistory?.transactions?.entries;
if (entries != null) {
for (final element in entries) {
if (element.value.direction == TransactionDirection.incoming) {
int curAddressIndex =
element.value.additionalInfo!['addressIndex'] as int;
@ -345,6 +346,7 @@ mixin CwBasedInterface<T extends CryptonoteCurrency> on CryptonoteWallet<T>
}
}
}
}
// Check the new receiving index
final currentReceiving = await getCurrentReceivingAddress();