Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Money inputs on charge, refund and payment forms parse floats instead of minor units

Aperta
#1,995 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@deslawson ci sta già lavorando.

Dal 18/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
nextjs, typescript
Ambito
frontend, payments

Direzione di ricerca

Inspect app/payments/new, app/admin/charge, app/admin/refund, and lib/WalletFundingModal.tsx to trace where free-text amounts are parsed. Find existing form, currency, and wallet-funding tests, then define coverage for decimal precision, JPY, large numbers, invalid characters, and min/max limits. The work is done when every listed form submits a safe integer in minor units matching the displayed amount.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug frontend NextJS Stellar Wave

Problem

app/payments/new and app/admin/charge send Number(amount) of whatever the user typed, app/admin/refund does Number(amount) on a string prefilled with String(payment.amount), and lib/WalletFundingModal.tsx uses parseFloat. The unit (minor vs major) is never stated in the UI, and free text allows 1e3, negative, fractional and multi-dot input; any conversion to minor units by multiplication would also hit floating point errors (for example 19.99 * 100 = 1998.9999999999998).

Proposed change

Add an AmountInput that accepts only digits and the currency's decimal places, converts with string math to integer minor units, enforces min/max, and use it in app/payments/new, app/admin/charge, app/admin/refund and the funding modal. Test with 0.1+0.2-style values, JPY and large numbers.

Acceptance criteria

  • The submitted payload amount is always a safe integer matching the displayed value.
Lingua principale
TypeScript
Stelle
16
Fork
225
Merge medio
10h 53m
PR unite (30g)
66

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DistinctCodes/ManageHub

Tutte le issue di DistinctCodes/ManageHub

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.