Skip to content

Add pauseInvoice and resumeInvoice methods with auto-resume support #866

Description

@Kingsman-99

Overview

Add pause and resume methods to StellarSplitClient wrapping the contract's pause_invoice and resume_invoice entry points, with full TypeScript typing for the auto-resume option.

Requirements

  • client.pauseInvoice(invoiceId, options?: { autoResumeAt?: Date }): Promise
  • client.resumeInvoice(invoiceId): Promise
  • client.isPaused(invoiceId): Promise
  • PauseStatus { paused: boolean, autoResumeAt?: Date } type
  • autoResumeAt converted from Date to Unix timestamp before submission
  • Tests: pause, resume, pause with auto-resume date, isPaused returns correct status

Acceptance Criteria

  • pauseInvoice and resumeInvoice implemented
  • isPaused returns correct PauseStatus
  • autoResumeAt Date conversion correct
  • npm test passes with zero failures
  • TypeScript compiles with zero errors
  • ESLint passes with zero errors

Definition of Done

All CI checks must pass before the PR is reviewed.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions