Skip to content

core: implement installment repayment XDR builder #33

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions