From b10e061ca2069ac3ffc208180d11da4e4d9a8667 Mon Sep 17 00:00:00 2001 From: Wisdom Arerosuoghene Date: Tue, 7 Jan 2025 09:13:55 +0100 Subject: [PATCH] populate transaction history before sync begins --- cw_decred/lib/wallet.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cw_decred/lib/wallet.dart b/cw_decred/lib/wallet.dart index 97d78ba23c..c572c7a731 100644 --- a/cw_decred/lib/wallet.dart +++ b/cw_decred/lib/wallet.dart @@ -89,6 +89,7 @@ abstract class DecredWalletBase Future init() async { updateBalance(); + updateTransactionHistory(); } void performBackgroundTasks() async { @@ -99,6 +100,10 @@ abstract class DecredWalletBase // final decoded = json.decode(res); // final hash = decoded["hash"] ?? ""; updateBalance(); + updateTransactionHistory(); + } + + void updateTransactionHistory() async { var from = 0; while (true) { // Transactions are returned from newest to oldest. Loop fetching 5 txn