Skip to content

Commit

Permalink
feat: mins nbtc balance
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 15, 2025
1 parent 4e7cd3f commit 2da219d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/get-balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ const getBalance = async (
account_id: accountId,
},
)) as string;
if (tokenId == "nbtc.toalice.near") {
return Decimal.max(new Decimal(balanceInYocto || 0).minus(1000), "0").toFixed();
}
}
return balanceInYocto;
} catch (err: any) {
Expand Down

0 comments on commit 2da219d

Please sign in to comment.