Skip to content

Feat/69 merchant validation#75

Merged
Josue19-08 merged 2 commits into
TrustUp-app:mainfrom
PatrickKish1:feat/69-merchant-validation
Jun 18, 2026
Merged

Feat/69 merchant validation#75
Josue19-08 merged 2 commits into
TrustUp-app:mainfrom
PatrickKish1:feat/69-merchant-validation

Conversation

@PatrickKish1

Copy link
Copy Markdown
Contributor

Summary

Completes SC-14 merchant validation coverage for creditline-contract by exercising all validate_merchant error paths against the real merchant-registry-contract.

Closes #69

Changes

  • validate_merchant already invokes merchant-registry-contract.is_active() before loan creation (no stub bypass)
  • Added tests:
    • Active merchant can receive a loan
    • Inactive merchant rejected (MerchantNotActive)
    • Unregistered merchant rejected (MerchantNotActive)
    • Missing registry address rejected (InvalidMerchant)
    • Invalid registry contract rejected (MerchantValidationFailed)

Test plan

  • cargo test -p creditline-contract merchant
  • Active / inactive / unregistered merchant scenarios
  • Missing and invalid merchant registry configuration

@Josue19-08 Josue19-08 self-requested a review June 18, 2026 00:02
@Josue19-08 Josue19-08 merged commit 49bddc1 into TrustUp-app:main Jun 18, 2026
2 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.

[FEATURE] SC-14: Integrate active merchant validation

2 participants