Money inputs on charge, refund and payment forms parse floats instead of minor units
Maintainer thường phản hồi trong vòng 1 ngày
@deslawson đang làm issue này rồi.
Từ ngày 18/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nextjs, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 16
- Fork
- 225
- Merge trung bình
- 10 giờ 53 phút
- Pull request đã merge (30 ngày)
- 66
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DistinctCodes/ManageHub
-
bug contract soroban-contract
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
DistinctCodes/ManageHub#2029 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend contract documentation soroban-contract
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DistinctCodes/ManageHub#2028 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add an end-to-end local sandbox for contracts (standalone network, deploy, call) to the repo docsĐang mởcontract documentation soroban-contract
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
DistinctCodes/ManageHub#2027 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend contract documentation NestJS soroban-contract
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
DistinctCodes/ManageHub#2026 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Contracts have no shared ABI/interface fixture used by both the Rust tests and the backend clientĐang mởbackend contract enhancement NestJS soroban-contract
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
DistinctCodes/ManageHub#2025 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của DistinctCodes/ManageHub
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
cline/cline#15327 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
LogicLabs-OU/OpenArchiver#509 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bigcapitalhq/bigcapital#1545 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày