Skip to content

Add Stellar USDC trustline validation before payouts#237

Open
Sikkra wants to merge 1 commit into
JosephOnuh:mainfrom
Sikkra:bounty-37-usdc-trustline-check
Open

Add Stellar USDC trustline validation before payouts#237
Sikkra wants to merge 1 commit into
JosephOnuh:mainfrom
Sikkra:bounty-37-usdc-trustline-check

Conversation

@Sikkra
Copy link
Copy Markdown

@Sikkra Sikkra commented May 19, 2026

Summary

  • Move Stellar recipient validation into src/lib/stellar.ts so public-key format, on-chain account existence, and configured USDC trustline checks are shared.
  • Reuse the shared validator in cycle payouts and cancellation refunds so both direct USDC transfer paths fail before sending when the recipient cannot receive USDC.
  • Add focused coverage for the trustline helper, payout validation reuse, and cancellation refund preflight ordering.

Closes #37

Verification

pm test -- --runTestsByPath src/lib/tests/stellar.test.ts src/server/services/tests/payout.service.test.ts --runInBand

pm test -- --runTestsByPath src/server/services/tests/circle.service.test.ts --runInBand -t cancelCircle

Notes

pm run type-check is currently blocked by existing repository-wide TypeScript issues outside this patch, including migration typing errors, missing Jest globals/types, missing exported app types, and existing API/service type errors.

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.

Implement Stellar USDC trustline check before payout

1 participant