Skip to content

Commit

Permalink
fix: the thing
Browse files Browse the repository at this point in the history
  • Loading branch information
rostislav-deriv committed Dec 13, 2023
1 parent 4f70cae commit 8a8c00e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/wallets/src/hooks/useInputATMFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const useInputATMFormatter = (inputRef: React.RefObject<HTMLInputElement>, initi
if (Number(unFormatLocaleString(formattedValue, locale)) === 0) {
const pasted = (e.clipboardData || window.clipboardData).getData('Text');
const pastedValue = Number(unFormatLocaleString(pasted, locale));
if (!isNaN(pastedValue) && isFinite(pastedValue))
if (!isNaN(pastedValue) && isFinite(pastedValue) && pastedValue >= 0)
onChange({
target: {
value: `${pastedValue.toLocaleString(locale, {
Expand Down

0 comments on commit 8a8c00e

Please sign in to comment.