Skip to content

fix(frontend): sign and submit loan repayment transactions - #1686

Merged
blurbeast merged 1 commit into
LabsCrypt:mainfrom
MJ-RWA:fix/loan-repayment-transaction-submission
Aug 30, 2026
Merged

fix(frontend): sign and submit loan repayment transactions#1686
blurbeast merged 1 commit into
LabsCrypt:mainfrom
MJ-RWA:fix/loan-repayment-transaction-submission

Conversation

@MJ-RWA

@MJ-RWA MJ-RWA commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the broken loan repayment flow where repayment transactions were built but never signed or submitted to the Stellar network.

The repayment flow now follows the correct transaction lifecycle:

Build transaction → Sign with wallet → Submit to network → Confirm success

Changes

  • Updated the repayment API contract to handle unsignedTxXdr and networkPassphrase returned by the backend.
  • Refactored the repayment operation to sign transactions through the wallet before submission.
  • Removed the placeholder transaction hash that incorrectly used the loan ID.
  • Ensured repayment success states are triggered only after successful network submission.
  • Prevented gamification XP and success messages from being granted for transactions that were never executed.
  • Improved handling of signing, submission, and network errors.

Problem

Previously, the frontend treated /loans/:loanId/repay as a fully executed transaction endpoint even though it only returns an unsigned transaction XDR. This allowed the UI to report a successful repayment without any transaction being signed or submitted to the Stellar network.

Testing

  • Verified the updated repayment flow follows the required build → sign → submit lifecycle.
  • Ran the relevant project validation checks and addressed any issues introduced by the changes.

Related Issue

Closes #1603

@blurbeast
blurbeast merged commit 94e308c into LabsCrypt:main Aug 30, 2026
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Frontend] useRepayLoan & LoanRepaymentForm never sign or submit repayment transactions to network

2 participants