fix: align repay function name between XDR builder and transaction checker#90
Open
khaylebfortune wants to merge 1 commit into
Open
fix: align repay function name between XDR builder and transaction checker#90khaylebfortune wants to merge 1 commit into
khaylebfortune wants to merge 1 commit into
Conversation
…ecker The deployed creditline contract function is 'repay_installment' but the transaction status checker was looking for 'repay_loan'. This mismatch meant successful on-chain repayments never triggered the follow-up loan balance deduction — loans appeared unpaid indefinitely. Changes: - transaction-status-checker.service.ts: check for 'repay_installment' - creditline.client.ts: fix error log to match actual function name - loans.controller.ts, loan-payment-response.dto.ts: update Swagger docs - Add alignment test to prevent future drift Closes StepFi-app#62
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix repayment function name mismatch
Problem
The XDR builder (
creditline.client.ts) builds transactions usingrepay_installmentbut the transaction status checker was looking forrepay_loan. This mismatch meant the follow-up loan balance deduction never triggered after successful on-chain repayments — loans appeared unpaid indefinitely.Root Cause
The function name was changed in one place but not the other during development, as documented in ISSUES.md.
Changes
src/jobs/transaction-status-checker/transaction-status-checker.service.tsrepay_installmentinstead ofrepay_loansrc/stellar/contracts/clients/creditline.client.tssrc/modules/loans/loans.controller.tssrc/modules/loans/dto/loan-payment-response.dto.tstest/unit/stellar/contract-function-name.spec.tsVerification
npm run buildpassesnpm test— 25 suites, 290 tests passCloses #62