mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 18:44:31 +00:00
xmr/wow address check null error fix
This commit is contained in:
parent
fb937ebddf
commit
ec52612f61
1 changed files with 9 additions and 7 deletions
|
@ -335,13 +335,15 @@ mixin CwBasedInterface<T extends CryptonoteCurrency> on CryptonoteWallet<T>
|
|||
Future<void> checkReceivingAddressForTransactions() async {
|
||||
try {
|
||||
int highestIndex = -1;
|
||||
for (var element
|
||||
in cwWalletBase!.transactionHistory!.transactions!.entries) {
|
||||
if (element.value.direction == TransactionDirection.incoming) {
|
||||
int curAddressIndex =
|
||||
element.value.additionalInfo!['addressIndex'] as int;
|
||||
if (curAddressIndex > highestIndex) {
|
||||
highestIndex = curAddressIndex;
|
||||
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;
|
||||
if (curAddressIndex > highestIndex) {
|
||||
highestIndex = curAddressIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue