Skip to content

Commit

Permalink
Merge pull request #1359 from near/display-fix
Browse files Browse the repository at this point in the history
fix: display balance
  • Loading branch information
gagdiez authored Jan 5, 2025
2 parents f8a3eaa + 705ad01 commit d0dd277
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/wallet-utilities/SendNear.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ export const SendNear = () => {
const loadBalance = async () => {
try {
const balanceYocto = await wallet.getBalance(signedAccountId);
const balance = parseFloat((BigInt(balanceYocto) / NEAR_NOMINATION).toString());
const balance = Number((BigInt(balanceYocto) * BigInt(100000)) / NEAR_NOMINATION) / 100000;

console.log('balance', balanceYocto, balance);
const requiredGas = 0.00005;

const availableBalance = Math.max(balance - requiredGas, 0);
Expand Down

0 comments on commit d0dd277

Please sign in to comment.