swapRecordFixture function

SwapRecord swapRecordFixture({
  1. String id = 'swap-record-1',
  2. SwapRecordDirection direction = SwapRecordDirection.outOfZec,
  3. int createdAt = 1700000000,
  4. int? depositDeadline = 4100000000,
  5. int expiresAt = 4100172800,
  6. SwapOutcome? outcome,
})

A durable in-flight swap row (W-swap-5, #366) — drives the wallet-screen swap home + the guard-fault "view swap" re-attach. Defaults to OutOfZec (the armed-deposit shape the hardware photo showed invisible).

Implementation

SwapRecord swapRecordFixture({
  String id = 'swap-record-1',
  SwapRecordDirection direction = SwapRecordDirection.outOfZec,
  int createdAt = 1700000000,
  // FAR-FUTURE default (#367): the home row renders the neutral past-window
  // line once `depositDeadline` lapses against the REAL clock (display-only),
  // so a default in the past would flip every fixture row off the live
  // direction-honest line the tests assert. Pass a past stamp explicitly to
  // exercise the past-window arm.
  int? depositDeadline = 4100000000,
  int expiresAt = 4100172800,
  SwapOutcome? outcome,
}) {
  return SwapRecord(
    id: id,
    direction: direction,
    createdAt: createdAt,
    depositDeadline: depositDeadline,
    expiresAt: expiresAt,
    outcome: outcome,
  );
}