Skip to content

Commit

Permalink
Export final transaction(s).
Browse files Browse the repository at this point in the history
Accidentally introduced a bug where it does not export the final transaction (e.g. the very first transaction for a wallet).
  • Loading branch information
m4dc0w authored Apr 10, 2022
1 parent 91d7229 commit eafb618
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,19 @@ func exportAccounts(client *indexer.Client, export exporter.Interface, accounts
// Rate limited to <1 request per second.
time.Sleep(2 * time.Second)
}
writeRecords(export, outCsv, assetMap, records)
// Export final transaction(s).
if len(txnsGroup) > 0 {
records, deferred, err := normalizeTransactions(client, export, account, assetMap, "", txnsGroup)
if err != nil {
return err
}
if deferred {
recordsDeferred = append(recordsDeferred, records)
txnsDeferred = append(txnsDeferred, txnsGroup)
} else {
writeRecords(export, outCsv, assetMap, records)
}
}
records = nil
txnsGroup = nil

Expand Down

0 comments on commit eafb618

Please sign in to comment.