Skip to content

Commit

Permalink
populate transaction history before sync begins
Browse files Browse the repository at this point in the history
  • Loading branch information
itswisdomagain committed Jan 7, 2025
1 parent 8511899 commit bf656ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cw_decred/lib/wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ abstract class DecredWalletBase

Future<void> init() async {
updateBalance();

updateTransactionHistory();
await walletAddresses.init();
}

Expand All @@ -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
Expand Down

0 comments on commit bf656ba

Please sign in to comment.