Skip to content

Commit 04b7900

Browse files
committed
Update index.js
1 parent 0fda9cb commit 04b7900

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/VoxStaking/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export default function VoxStaking() {
213213
}
214214
const raw = v.replace(/[,\s\u00A0\u202F']/g, '');
215215
if (!/^\d*\.?\d*$/.test(raw)) return; // allow only numbers & decimal
216-
setStakeAmount(formatNumberLocale(raw));
216+
setStakeAmount(raw);
217217
};
218218

219219
// Handle withdraw input change
@@ -230,9 +230,9 @@ export default function VoxStaking() {
230230

231231
// Don't allow withdraw amount to exceed staked amount
232232
if (amount > staked) {
233-
setWithdrawAmount(formatNumberLocale(staked.toString()));
233+
setWithdrawAmount(staked.toString());
234234
} else {
235-
setWithdrawAmount(formatNumberLocale(raw));
235+
setWithdrawAmount(raw);
236236
}
237237
};
238238
const [selectedDuration, setSelectedDuration] = useState(null);
@@ -1734,7 +1734,7 @@ useEffect(() => {
17341734
const perc = btn.value;
17351735
if (!voxBalance || isNaN(parseFloat(voxBalance))) return;
17361736
const amount = (parseFloat(voxBalance) * perc) / 100;
1737-
const formatted = formatNumberLocale(perc === 100 ? parseFloat(voxBalance).toString() : amount.toFixed(3));
1737+
const formatted = perc === 100 ? parseFloat(voxBalance).toString() : amount.toFixed(3);
17381738
setStakeAmount(formatted);
17391739
}}
17401740
>
@@ -1834,7 +1834,7 @@ useEffect(() => {
18341834
const perc = btn.value;
18351835
if (!stakedAmount || isNaN(parseFloat(stakedAmount))) return;
18361836
const amount = (parseFloat(stakedAmount) * perc) / 100;
1837-
const formatted = formatNumberLocale(perc === 100 ? parseFloat(stakedAmount).toString() : amount.toFixed(3));
1837+
const formatted = perc === 100 ? parseFloat(stakedAmount).toString() : amount.toFixed(3);
18381838
setWithdrawAmount(formatted);
18391839
}}
18401840
>

0 commit comments

Comments
 (0)