Skip to content

Add get_invoice_deadline view function returning deadline timestamp #590

Description

@Kingsman-99

Description

Invoice deadlines are key for frontend expiry countdown UI. There is no standalone getter for an invoice's deadline field. Adding get_invoice_deadline(invoice_id: u64) -> u64 avoids forcing callers to decode the full struct.

Acceptance Criteria

  • Add pub fn get_invoice_deadline(env: Env, invoice_id: u64) -> u64 to contracts/split/src/lib.rs
  • Reads deadline from InvoiceCore persistent storage
  • Returns ContractError::InvoiceNotFound for unknown IDs
  • Unit test verifies the returned value matches the deadline set at creation
  • cargo test passes

Context

  • Target file: contracts/split/src/lib.rs

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptsfeatureNew contract feature or operation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions