Skip to content

Commit

Permalink
refactor: use bignumber where relevant (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsANameToo authored Jun 4, 2024
1 parent 3a5cdbb commit f11f110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const Send = () => {
})
.test('max-balance', t('ERROR.BALANCE_TOO_LOW'), (value) => {
if (!value) return true;
const userBalance = primaryWallet?.balance() || 0;
return Number(value) <= userBalance;
const userBalance = BigNumber.make(primaryWallet?.balance() || 0);
return BigNumber.make(value).isLessThanOrEqualTo(userBalance);
})
.test(
'total-check',
Expand Down

0 comments on commit f11f110

Please sign in to comment.