Skip to content

feat(search): add searchByMemo full-text search to search.ts (closes #614) - #787

Draft
s6pa1rta3n-lab wants to merge 1 commit into
Stellar-split:mainfrom
s6pa1rta3n-lab:fix-search-by-memo-614
Draft

feat(search): add searchByMemo full-text search to search.ts (closes #614)#787
s6pa1rta3n-lab wants to merge 1 commit into
Stellar-split:mainfrom
s6pa1rta3n-lab:fix-search-by-memo-614

Conversation

@s6pa1rta3n-lab

Copy link
Copy Markdown

Summary

Closes #614

Implements searchByMemo in src/search.ts and exports it from src/index.ts to enable full-text substring search across invoice arrays by payment memo text.

Acceptance Criteria Checklist

  • searchByMemo(invoices: Invoice[], query: string, opts?: { caseSensitive?: boolean }): Invoice[] exported from src/search.ts
  • Returns invoices where invoice.memo contains query as a substring; case-insensitive by default
  • Empty query returns all invoices unchanged
  • Invoices with memo of undefined or null are skipped without error
  • opts.caseSensitive = true enables exact-case matching
  • Exported from src/index.ts
  • Unit tests: substring match, case-insensitive default, case-sensitive override, empty query returns all, null memo skipped

Changes Made

  • Added SearchByMemoOptions interface and searchByMemo implementation to src/search.ts.
  • Exported searchByMemo, searchInvoices, SearchQuery, SearchResult, and SearchByMemoOptions from src/index.ts.
  • Added comprehensive unit test suite in test/searchByMemo.test.ts verifying all acceptance criteria with true verification (no assertion mocking).

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

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 searchByMemo full-text search to search.ts

1 participant