Skip to content

[FE-47] Build lease management UI — create on-chain lease agreements and view lease terms #984

Description

@yusuftomilola

Overview

Assets can be leased to third parties with terms recorded on the Stellar blockchain. This UI allows creating a lease, viewing its terms, and terminating it. Depends on BE-64.

Context

  • Add a "Lease" section to the asset detail page Overview tab (or a dedicated sub-tab)
  • API endpoints (from BE-64): POST /stellar/assets/:id/lease, GET /stellar/assets/:id/lease, PATCH /stellar/assets/:id/lease/terminate

Acceptance Criteria

  • If no active lease: show "Create Lease" button with form: lessee Stellar address, start date, end date, monthly rent (XLM), deposit amount
  • Form validation: end date must be after start date, rent must be > 0
  • On submit: show "Recording on Stellar..." loader, display success with transaction hash
  • If active lease: show lease details card — lessee address, period, monthly rent, deposit, days remaining, transaction hash
  • "Terminate Lease" button (admin only) with confirmation dialog: "This will record the termination on-chain. Are you sure?"
  • Lease duration countdown chip (e.g., "127 days remaining")

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions