From ccfad12fd42e0c6ced159010b5471a43cc384176 Mon Sep 17 00:00:00 2001 From: naturexie <786281870@qq.com> Date: Tue, 18 Feb 2025 21:42:46 +0800 Subject: [PATCH] feat: reserve nbtc for gas --- api/get-balance.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/get-balance.ts b/api/get-balance.ts index a505ba06..d5312931 100644 --- a/api/get-balance.ts +++ b/api/get-balance.ts @@ -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(); } }