Fix amount input rejecting decimal values - #626
Merged
Conversation
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.
✅ Deploy Preview for cheery-moxie-4f1121 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The send Amount input (
TransferMenu.vue) istype="number"with nostep, so the browser defaults tostep=1and treats only whole numbers as valid. Any fractional amount — which is almost every send, and every MAX send — is rejected with:Why it surfaced now
The input has been
type="number"withoutstepfor 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, soanyavoids false rejections.Scope
Audited every amount input in the app:
type="text", unaffected.inputmode="decimal", unaffected.NumericInput, integer-by-design (Number.isInteger);step=1is correct there. Left unchanged.The send amount is the only affected field.