diff --git a/lib/services/coins/dogecoin/dogecoin_wallet.dart b/lib/services/coins/dogecoin/dogecoin_wallet.dart index 073d050c9..2db5ee516 100644 --- a/lib/services/coins/dogecoin/dogecoin_wallet.dart +++ b/lib/services/coins/dogecoin/dogecoin_wallet.dart @@ -545,6 +545,12 @@ class DogecoinWallet extends CoinServiceAPI // refresh transactions to pick up any received notification transactions await _refreshTransactions(); + // restore paynym transactions + await restoreAllHistory( + maxUnusedAddressGap: maxUnusedAddressGap, + maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + ); + await _updateUTXOs(); await Future.wait([ diff --git a/lib/services/mixins/paynym_wallet_interface.dart b/lib/services/mixins/paynym_wallet_interface.dart index 16d65c6cf..ee86b3e79 100644 --- a/lib/services/mixins/paynym_wallet_interface.dart +++ b/lib/services/mixins/paynym_wallet_interface.dart @@ -724,6 +724,20 @@ mixin PaynymWalletInterface { return unBlindedList; } + Future restoreAllHistory({ + required int maxUnusedAddressGap, + required int maxNumberOfIndexesToCheck, + }) async { + final codes = await getAllPaymentCodesFromNotificationTransactions(); + final List> futures = []; + for (final code in codes) { + futures.add(restoreHistoryWith( + code, maxUnusedAddressGap, maxNumberOfIndexesToCheck)); + } + + await Future.wait(futures); + } + Future restoreHistoryWith( PaymentCode other, int maxUnusedAddressGap,