Skip to content

Commit

Permalink
fix: btc balance
Browse files Browse the repository at this point in the history
  • Loading branch information
AricRedemption committed May 11, 2024
1 parent 0fc56e1 commit aed8f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/queries/balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const fetchBtcBalance = async (address: string): Promise<Balance> => {
const data = await metaletApiV3<BTCBalance>(`/address/btc-balance`).get({ net, address })
return {
total: new Decimal(data.balance).mul(1e8).toNumber(),
confirmed: new Decimal(data.block.incomeFee).mul(1e8).toNumber(),
unconfirmed: new Decimal(data.mempool.incomeFee).mul(1e8).toNumber(),
confirmed: new Decimal(data.block.incomeFee - data.block.spendFee).mul(1e8).toNumber(),
unconfirmed: new Decimal(data.mempool.incomeFee - data.mempool.spendFee).mul(1e8).toNumber(),
}
}

Expand Down

0 comments on commit aed8f7b

Please sign in to comment.