transactions method

  1. @override
Future<HistoryPage> transactions({
  1. required int limit,
  2. String? after,
})
override

The transaction history for the activity list (FR-1), newest first and paginated by an OPAQUE keyset cursor: pending (unmined) rows sort above confirmed ones; after is null for the first page or the previous HistoryPage.nextCursor for the following page (passed back VERBATIM — never parse it); limit caps the page (clamped Rust-side). The keyset cursor means a page boundary never drops a same-height row nor strands the confirmed history behind a full page of pending txs. Each TxSummary carries the SIGNED net amount, status/confirmations, fee, and a memo flag — DISPLAY data only (no key material; §5.4 NEVER-LOG: txids/amounts/cursors). Reads librustzcash's v_transactions view off the sync lock, so it's cheap and never blocks scanning.

Implementation

@override
Future<HistoryPage> transactions({required int limit, String? after}) {
  transactionsCount++;
  lastTransactionsLimit = limit;
  lastTransactionsAfter = after;
  if (transactionsNeverCompletes) return Completer<HistoryPage>().future;
  if (transactionsThrows != null) {
    return Future<HistoryPage>.error(transactionsThrows!);
  }
  if (pagesByCursor.isNotEmpty) {
    final page =
        pagesByCursor[after] ?? const HistoryPage(rows: [], nextCursor: null);
    return Future<HistoryPage>.value(page);
  }
  return Future<HistoryPage>.value(
    HistoryPage(rows: transactionsResult, nextCursor: nextCursorResult),
  );
}