Skip to content

Stellar address validation is inconsistent and weaker than available SDK checksum validation #3

Description

@abayomicornelius

src/utils/validation.ts's validateRecipient and src/components/SendFlow/RecipientStep.tsx's inline validate() both only check address.startsWith('G') && address.length === 56, which accepts strings that are not valid ed25519 public keys (bad checksum).

Meanwhile src/utils/stellar.ts already exports a correct isValidStellarAddress using StrKey.isValidEd25519PublicKey, and src/components/ContactBook/AddContact.tsx correctly uses it. Consolidate all recipient/address validation call sites onto isValidStellarAddress to prevent building/signing transactions against malformed addresses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions