Validate the client address properly (checksum, not just "G" + length 56)

Abierto
#11 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@nilhn9660 ya está trabajando en esto.

Desde el 21/11/2026.

  • #48 de @nilhn9660 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
74/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
nextjs, react, typescript

Línea de trabajo

Start in web/app/create/page.tsx at the current validate() check for startsWith("G") && length === 56; replace it with StrKey.isValidEd25519PublicKey from @stellar/stellar-sdk and branch the error messages for muxed, contract and malformed input. Read the test setup from #13 before adding unit tests for a one-character typo, a valid key, and the three rejected address forms. Done means inline validation rejects bad checksums, accepts valid Ed25519 keys, shows a visible valid state, and the new tests pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

difficulty: intermediate enhancement help wanted Stellar Wave ux web

Difficulty: Intermediate

Description

validate() in web/app/create/page.tsx only checks startsWith("G") && length === 56. A mistyped address with a bad checksum passes validation and fails later. This matters because the client address is stored in an immutable on-chain invoice that cannot be edited.

Implementation suggestions

Use StrKey.isValidEd25519PublicKey from @stellar/stellar-sdk. Reject muxed (M...) and contract (C...) addresses with a specific message. Add a visible "valid" state. Optionally warn when the address looks unfunded (Horizon 404).

Acceptance criteria

  • A one-character typo is rejected inline.
  • Valid keys pass.
  • Messages differ for muxed, contract and malformed input.
  • Unit tests are included.

Dependencies / related

Uses the test setup from #13. Shares validation conventions with #6.

Lenguaje dominante
TypeScript
Estrellas
0
Forks
4
Merge medio
54 min
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Yormee-103/PayLoop

Todos los issues de Yormee-103/PayLoop

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.