Skip to content

feat: page invoice search results#1805

Open
maxw06 wants to merge 2 commits into
QuickLendX:mainfrom
maxw06:codex/search-invoices-paged-1726
Open

feat: page invoice search results#1805
maxw06 wants to merge 2 commits into
QuickLendX:mainfrom
maxw06:codex/search-invoices-paged-1726

Conversation

@maxw06

@maxw06 maxw06 commented Jul 7, 2026

Copy link
Copy Markdown

Fixes #1726.

Summary

  • Add InvoiceSearch::search_invoices_paged(env, query, offset, limit) with a documented MAX_SEARCH_RESULTS cap and absurd-offset rejection.
  • Keep search_invoices as a thin first-page compatibility wrapper.
  • Add coverage for zero limit, above-cap limit clamping, offset-past-end, offset rejection, pagination ordering, and wrapper parity.

Validation

  • git diff --check passes.
  • cargo test -p quicklendx-contracts search_invoices_paged -- --nocapture currently fails before reaching these tests on inherited origin/main compile debt: duplicate bench module, duplicate compute_yield, missing idempotency / address_summary modules, and a non-exhaustive InvalidLedgerSequence match in errors.rs.
  • cargo fmt is also blocked on current main by an unrelated parse error in quicklendx-contracts/src/test_bid_capacity_stress.rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an invoice search result-count cap and offset support to bound search_invoices instruction cost

1 participant