Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,995 コメント 4 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@deslawson がすでに取り組んでいます。

2026年10月18日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
nextjs, typescript
領域
frontend, payments

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
16
フォーク
225
平均マージ
8時間 4分
マージ済み PR(30日)
61

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DistinctCodes/ManageHub のほかの issue

DistinctCodes/ManageHub の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。