Skip to content

core: implement installment repayment XDR builder #33

@EmeditWeb

Description

@EmeditWeb

Problem

POST /loans/:id/repay exists but the service does not
build the actual unsigned XDR calling repay_installment()
on the creditline contract.

What To Build

  1. Implement buildRepaymentXdr() in loans.service.ts
  2. Add submitRepayment() in blockchain.service.ts
  3. Two-step flow: get unsigned XDR, then submit signed

Files To Touch

  • src/modules/loans/loans.service.ts
  • src/modules/loans/loans.controller.ts
  • src/modules/blockchain/blockchain.service.ts

Acceptance Criteria

  • buildRepaymentXdr() returns valid XDR
  • XDR calls correct contract function
  • Submission waits for ledger confirmation
  • Transaction hash returned on success
  • npm run build passes

Mandatory Checks Before PR

  • npm run build passes
  • No any types
  • PR references this issue

Metadata

Metadata

Assignees

No one assigned

    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