Skip to content

Fix amount input rejecting decimal values - #626

Merged
JSKitty merged 1 commit into
masterfrom
fix-amount-decimals
Jul 22, 2026
Merged

Fix amount input rejecting decimal values#626
JSKitty merged 1 commit into
masterfrom
fix-amount-decimals

Conversation

@JSKitty

@JSKitty JSKitty commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

The send Amount input (TransferMenu.vue) is type="number" with no step, so the browser defaults to step=1 and treats only whole numbers as valid. Any fractional amount — which is almost every send, and every MAX send — is rejected with:

Please select a valid value. The two nearest valid values are N and N+1.

Why it surfaced now

The input has been type="number" without step for a long time, but nothing triggered the browser's native constraint validation. #616 (enter/esc form shortcuts) makes Enter submit the form, which runs the native validation and surfaces the tooltip.

Fix

Add step="any" to the amount input, disabling integer-step validation so any decimal (PIVX has 8 dp) is accepted. MAX values are satoshi-precise, so any avoids false rejections.

Scope

Audited every amount input in the app:

  • Send fiat fieldtype="text", unaffected.
  • Staking / unstaking / cold-stake amount — plain text input with inputmode="decimal", unaffected.
  • Proposal amount-per-cycleNumericInput, integer-by-design (Number.isInteger); step=1 is correct there. Left unchanged.

The send amount is the only affected field.

The send Amount input was type="number" with no step, so the browser
defaulted to step=1 and treated only whole numbers as valid — any
fractional amount was rejected with "Please select a valid value. The
two nearest valid values are N and N+1." This blocked almost every
send, since MAX and most amounts are fractional (PIVX has 8 decimals).

Add step="any" to disable integer-step validation. MAX values are
satoshi-precise, so "any" avoids false rejections.

Latent for a while, but exposed by #616 (enter/esc form shortcuts):
submit-on-Enter triggers the browser's native constraint validation,
which surfaces the tooltip.
@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit 0206c5b
🔍 Latest deploy log https://app.netlify.com/projects/cheery-moxie-4f1121/deploys/6a60e0380f1763000814ee8d
😎 Deploy Preview https://deploy-preview-626--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@JSKitty
JSKitty merged commit 27450df into master Jul 22, 2026
5 checks passed
@JSKitty
JSKitty deleted the fix-amount-decimals branch July 22, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant