From bf656baf7672c74a2c8f573af6b817dcd1c89a63 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cw_decred/lib/wallet.dart b/cw_decred/lib/wallet.dart index b21295887e..52af65b36f 100644 --- a/cw_decred/lib/wallet.dart +++ b/cw_decred/lib/wallet.dart @@ -89,7 +89,7 @@ abstract class DecredWalletBase Future init() async { updateBalance(); - + updateTransactionHistory(); await walletAddresses.init(); } @@ -101,6 +101,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