Skip to content

fix: structured error codes across all contracts, contract ID validation, event indexer fields#527

Merged
sanmipaul merged 3 commits into
astera-hq:mainfrom
0xsteins:isuess-stteins
May 28, 2026
Merged

fix: structured error codes across all contracts, contract ID validation, event indexer fields#527
sanmipaul merged 3 commits into
astera-hq:mainfrom
0xsteins:isuess-stteins

Conversation

@0xsteins
Copy link
Copy Markdown
Contributor

closes #396 - Replace all string panic!() calls in invoice, pool, and credit_score contracts
with typed #[contracterror] enum variants; add 23 new InvoiceError codes (19–41), 3 new
PoolError codes (44–46), and 9 new CreditScoreError codes (1–9). All #[should_panic] tests
converted to try_* method assertions against specific error variants.

closes #402 - Add token address field to deposit and withdraw events in the pool contract
so off-chain indexers can identify which token was moved without reading contract storage.

closes #380 - Add module-load-time contract ID validation in frontend/lib/contracts.ts;
throws ConfigError with a descriptive message if any contract ID is missing or fails the
Stellar address format check (56 chars, starts with C). Guard is browser-only to preserve
CI/SSR compatibility, consistent with the existing assertEnvValid pattern.

closes #394 - Dashboard invoice list pagination was already fully implemented (PAGE_SIZE=20,
URL-reflected ?page=N, Prev/Next controls, "Showing X–Y of Z" counter); no changes needed.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@0xsteins Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@sanmipaul sanmipaul merged commit c92676b into astera-hq:main May 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment