Telegram: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
backend/src/utils/stellar.ts exposes isValidStellarAddress, but its regex is ^G[A-Z2-7]{54}$ — that only matches 55 characters total (G + 54). A real Stellar public key is 56 characters (G + 55). The preceding length check on line 33 correctly requires length === 56, so the regex can never match a valid address that passes the length check, making the function reject every valid address.
For comparison, both backend/src/services/remittanceService.ts and frontend/src/app/utils/stellar.ts correctly use {55}.
Verified locally:
G + 55 chars -> length 56
/^G[A-Z2-7]{54}$/.test(addr) === false // util (wrong)
/^G[A-Z2-7]{55}$/.test(addr) === true // service/frontend (correct)
Acceptance criteria
Files to touch
backend/src/utils/stellar.ts
Out of scope
- Refactoring the duplicate validators in other files (tracked separately)
Telegram: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
backend/src/utils/stellar.tsexposesisValidStellarAddress, but its regex is^G[A-Z2-7]{54}$— that only matches 55 characters total (G + 54). A real Stellar public key is 56 characters (G + 55). The preceding length check on line 33 correctly requireslength === 56, so the regex can never match a valid address that passes the length check, making the function reject every valid address.For comparison, both
backend/src/services/remittanceService.tsandfrontend/src/app/utils/stellar.tscorrectly use{55}.Verified locally:
Acceptance criteria
backend/src/utils/stellar.tsfrom{54}to{55}G...address returnstrueassertValidStellarAddressno longer throws for valid inputFiles to touch
backend/src/utils/stellar.tsOut of scope