Skip to content

Add cancelReminder and getPendingReminders to invoiceReminderScheduler #616

Open

Description

@Kingsman-99

Description

src/invoiceReminderScheduler.ts schedules reminders for invoice deadlines but provides no way to cancel a previously scheduled reminder. If an invoice is paid early or the deadline changes, the reminder fires anyway with no cancellation path.

Acceptance Criteria

  • scheduleReminder returns a reminderId: string (opaque unique identifier)
  • cancelReminder(reminderId: string): boolean exported — cancels the reminder and returns true; returns false if the ID is unknown or already fired
  • getPendingReminders(): Array<{ reminderId: string; invoiceId: string; remindAt: number }> exported — returns all not-yet-fired, not-cancelled reminders
  • Cancelled reminders do not fire even if their scheduled time passes
  • clearAllReminders(): void exported for test teardown
  • All exported from src/index.ts
  • Unit tests: cancel before fire prevents callback, cancel unknown ID returns false, cancel already-fired returns false, getPendingReminders excludes cancelled

Context

  • Target files: src/invoiceReminderScheduler.ts, src/index.ts
  • Use fake timers in tests (vi.useFakeTimers) to control time without real delays

Activity

  1. bobo-24 commented on Aug 19, 2026

    @bobo-24

    Hi! I’m a full-stack developer with a strong blockchain background, and I’m confident I can resolve this issue quickly and effectively. I’ll deliver a clean, reliable solution with immediate attention to detail, ensuring it’s completed as soon as possible. Please assign it to me—I’m ready to get started right away.

  2. afeezorobsco-cyber commented on Aug 19, 2026

    @afeezorobsco-cyber

    I would like to work on this issue

  3. grantfox-oss commented on Aug 27, 2026

    @grantfox-oss

    🦊 GrantFox — @afeezorobsco-cyber has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #616)
    2. Your PR will be reviewed by the Stellar-split maintainers

    Good luck! Track your progress on GrantFox.

  4. huangji6693-max commented on Oct 27, 2026

    @huangji6693-max

    Submitted PR #1220 implementing scheduleReminder, cancelReminder, getPendingReminders, and clearAllReminders with fake-timer unit test coverage.

    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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions