Skip to content

feat(creditline): add vendor payment on loan approval#32

Closed
divicbold47 wants to merge 1 commit into
StepFi-app:mainfrom
divicbold47:implement_vendor_payment_escrow_in_creditline
Closed

feat(creditline): add vendor payment on loan approval#32
divicbold47 wants to merge 1 commit into
StepFi-app:mainfrom
divicbold47:implement_vendor_payment_escrow_in_creditline

Conversation

@divicbold47

Copy link
Copy Markdown

close #19

Add vendor payment support to the Creditline contract so approved loans actually transfer the funded amount to the vendor.

Files Changed
types.rs
lib.rs
events.rs
errors.rs
tests.rs
What Changed
Added vendor_paid: bool to Loan
Added pay_vendor() public entrypoint
Added internal vendor payment flow in pay_vendor_internal()
Integrated vendor payment into approve_loan() so approving a pending loan:
funds the vendor with the pool contribution
marks the loan as Active
sets vendor_paid = true
writes the updated loan
Added VENDOR_PAID event emission with loan/vendor/amount details
Added new error VendorAlreadyPaid
Added tests for:
successful approval and vendor payment
direct pay_vendor() flow
prevention of duplicate vendor payment
Testing
Verified modified files have no diagnostics errors
Could not execute cargo test in the current container because cargo is not installed on PATH
Notes
This addresses the issue where approved loans were not actually paying vendors
Uses stored token contract and liquidity pool fund flow for vendor payment

@EmeditWeb

Copy link
Copy Markdown
Member

@divicbold47 fix ci issues

@divicbold47 divicbold47 deleted the implement_vendor_payment_escrow_in_creditline branch June 19, 2026 12:55
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.

core: implement vendor payment escrow in creditline

2 participants