Skip to content

Commit

Permalink
feat: reserve nbtc for gas
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Feb 18, 2025
1 parent 1dcabd0 commit ccfad12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/get-balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ const getBalance = async (
account_id: accountId,
},
)) as string;
if (tokenId == NBTCTokenId) {
if (
tokenId === NBTCTokenId &&
window.selector?.store?.getState()?.selectedWalletId === "btc-wallet"
) {
return Decimal.max(new Decimal(balanceInYocto || 0).minus(1000), "0").toFixed();
}
}
Expand Down

0 comments on commit ccfad12

Please sign in to comment.