SIGN IN SIGN UP

fix(amounts): one definition of a valid amount, and the token's real precision

compareAmounts accepted ".5" while addAmounts threw on it, so the same string
could pass a sufficiency check and then fail partway through a payment. And
addAmounts truncated anything below 18 decimals in silence while
compareAmounts counted it, so the two disagreed about whether dust was greater
than zero.

Both now share one parser, which refuses more decimal places than the token
carries rather than rounding someone's money down, and every call site passes
the token's real precision instead of assuming eighteen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
B
bongbongcrypto committed
34203674c45c66b85ec47a595cf26f6a1770ac2b
Parent: ed0f320