Summary
Stellar addresses submitted via API are stored in the database without format validation. An invalid address that passes into storage will cause downstream failures that are harder to diagnose. A validation helper should check the format at the API boundary before any write.
Scope
- Add
isValidStellarAddress(address: string): boolean helper
- Valid addresses start with
G, are exactly 56 characters, and contain only base32 alphanumeric characters
- Apply the helper in all endpoints that accept a wallet or recipient address in the request body
- Add unit tests: valid address returns true, wrong starting character, wrong length, invalid characters each return false
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
Stellar addresses submitted via API are stored in the database without format validation. An invalid address that passes into storage will cause downstream failures that are harder to diagnose. A validation helper should check the format at the API boundary before any write.
Scope
isValidStellarAddress(address: string): booleanhelperG, are exactly 56 characters, and contain only base32 alphanumeric charactersAcceptance Criteria
ETA: 12 hours
Coordinate on Telegram