Skip to content

Commit

Permalink
fix(wallet, ui): resolve wallet issue and fix visual bug
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenary committed Dec 4, 2024
1 parent 038b09f commit 737eea9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/wallet-utilities/SendNear.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type FormData = {

function displayBalance(balance: number) {
if (balance && parseFloat(balance.toFixed(4)) === 0) return '< 0.0001';
return balance
return balance;
}

export const SendNear = () => {
Expand All @@ -27,10 +27,10 @@ export const SendNear = () => {

const loadBalance = async () => {
try {
const balance = await wallet.getBalance(signedAccountId,true);
const balance = await wallet.getBalance(signedAccountId, true);
const requiredGas = 0.00005;
const availableBalance = Math.max(balance - requiredGas,0);

const availableBalance = Math.max(balance - requiredGas, 0);
const formattedNumber = parseFloat(availableBalance.toFixed(4));
setCurrentNearAmount(formattedNumber);
} catch (error) {
Expand Down

0 comments on commit 737eea9

Please sign in to comment.