Contract: cancel_invoice for pending invoices

Đang mở
#29 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@robertocarlous đang làm issue này rồi.

Từ ngày 21/11/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

contract difficulty: intermediate enhancement needs-discussion Stellar Wave web

Difficulty: Intermediate

Description

An invoice is immutable once created. A freelancer who typed the wrong client or amount can never retract it, and it keeps showing as Pending (and eventually Overdue) forever.

Implementation suggestions

Add InvoiceStatus::Cancelled = 2 (appended). cancel_invoice(invoice_id) requires freelancer auth and works only on Pending. Add Error::NotCancellable, an InvoiceCancelled event, and make fund_invoice reject cancelled invoices. Update decodeInvoice, StatusBadge, the dashboard totals, the History filters and the pay page.

Acceptance criteria

  • Tests cover cancel by the freelancer, cancel by an impostor and with no auth (both rejected), cancel after Paid (rejected), and funding after cancel (rejected).
  • The UI shows a Cancelled badge.
  • Docs are updated.

Dependencies / related

Needs discussion (redeploy and a status-decoding change; see the numeric status decoding comment in web/lib/contract.ts). Batch with #27, #28 and #30. Extend the error map in #12.

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
54 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Yormee-103/PayLoop

Tất cả issue của Yormee-103/PayLoop

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.