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 cf6268f commit b10e061
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cw_decred/lib/wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ abstract class DecredWalletBase

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

void performBackgroundTasks() async {
Expand All @@ -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
Expand Down

0 comments on commit b10e061

Please sign in to comment.