Skip to content

Borrower: Create Offer modal #30

@ardier16

Description

@ardier16

Describe the feature

Description:
Implement single-form modal for borrowers to create lending offers, followed by processing and success states.

Acceptance Criteria:

  • Single Create Borrow Offer modal implemented (one form):
    • Collateral amount (auto-filled from UTXO)
    • Loan amount input (USDT)
    • Fee input (USDT)
    • Duration/Term selector (days/blocks)
    • Derived values shown in real-time: APR (%) and LTV (%)
    • Inline validation states and disabled submit when invalid
    • Single CTA: "Create Borrow Offer"
  • Processing modal/state after submit:
    • Show staged progress states (validating offer, checking limits, creating tx, broadcasting)
    • Pending state with spinner/progress
    • Success state with txid and link to Esplora
    • Error state with retry and clear reason
  • localStorage persistence:
    • Save in-progress form values
    • Restore draft on refresh before submission
  • Transaction builders called:
    • buildPrepareUtilityNftsTx() — prepare 4 utility UTXOs
    • buildIssueUtilityNftsTx() — issue NFTs
    • buildPreLockCreationTx() — create pre-lock
  • All tx signing via Jade (Jade wallet integration #24)
  • Manual test: Complete single-form offer creation flow on testnet, verify on Esplora

Notes:

  • Modal closes on success; returns to Dashboard
  • Keep UX aligned with Figma: one form modal + processing state modal
  • localStorage key: borrower_offer_draft

Metadata

Metadata

Assignees

Labels

webWebsite-related issues
No fields configured for Feature.

Projects

Status

Blocked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions