Skip to content

feat(reminders): add cancelReminder and getPendingReminders to invoiceReminderScheduler (#616) - #1220

Closed
huangji6693-max wants to merge 1 commit into
Stellar-split:mainfrom
huangji6693-max:feat/issue-616-invoice-reminder-cancel-pending
Closed

huangji6693-max wants to merge 1 commit into
Stellar-split:mainfrom
huangji6693-max:feat/issue-616-invoice-reminder-cancel-pending

Conversation

@huangji6693-max

Copy link
Copy Markdown

Summary

  • Exports scheduleReminder, cancelReminder, getPendingReminders, and clearAllReminders from src/invoiceReminderScheduler.ts and re-exports them from src/index.ts (alongside instance methods on InvoiceReminderScheduler).
  • Ensures cancelled reminders clear their underlying timers and do not fire when scheduled time passes.
  • Adds unit tests using fake timers (vi.useFakeTimers) covering cancellation before fire, unknown/already-fired IDs returning false, getPendingReminders filtering, and clearAllReminders teardown.

Closes #616

Verification

  • npx vitest run test/invoiceReminderScheduler.test.ts -> 12 passed, 0 failed

Payout Wallets

  • Stellar (XLM / USDC): GBYWLISGOUWQ43VQEGXX6KRGDZ3CKAFFK3JXVLXKDO5TIFJUJ3OHJYOZ
  • EVM / Base (USDC): 0x380C97bcbcAEf29DAc2d0ba7E180F1b4A7F38fdd
  • Solana (USDC / SOL): AyXYaA9Nf4z5fpLKY6DmubWe6D2qveMd79w8pEDNHcDw

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 cancelReminder and getPendingReminders to invoiceReminderScheduler

2 participants