Commit Graph

1 Commits

Author SHA1 Message Date
9c2f617ac0 fix: explain a rejected dust threshold instead of snapping back silently (closes #233)
All checks were successful
check / check (push) Successful in 31s
The dust threshold field resynced to the stored value on a rejected input
and said nothing, so the box changed to a different number with no reason
given. It was the only validated input in the settings view that rejected
without a message.

Rejected input now shows one full sentence naming the constraint, using the
flash line already used by the RPC and Blockscout validation in the same
file. No layout shift: #flash-msg is always present with its height
reserved.

Hex and exponent notation are rejected rather than accepted. Number() reads
0x10 as 16 and 1e3 as 1000, which the earlier parseInt did not, and storing
either would put a number in the field that the user never typed - the same
silent substitution the message exists to end. Accepted input is plain
decimal digits only; the field is inputmode="numeric" and the unit is
printed beside it.

The parse moves to src/popup/dustThreshold.js, pure and unit tested, with
the message beside it so there is one wording. Tests cover the accepted set,
the rejected notations, that a rejection flashes the message and stores
nothing while a valid value stores and stays quiet, and that the flash line
reserves its height.
2026-08-12 08:21:09 +00:00