on-chain fee display bug

This commit is contained in:
lemonknowsall committed 2025-10-24 22:45:29 -07:00
1 parent aff1b0add5
commit 9e29d18a70
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -200,7 +200,7 @@ export function TransactionHistory({
{tx.type === 'sent' ? '-' : '+'}
{formatBitcoinAmount(tx.amount)}
</div>
{tx.fee && tx.type === 'sent' && (
{tx.fee !== undefined && tx.fee > 0 && tx.type === 'sent' && (
<div className="text-xs text-muted-foreground mt-1">
Fee: {formatBitcoinAmount(tx.fee)}
</div>
+2 -2
View File
@@ -60,7 +60,7 @@ async function fetchBitcoinTransactions(address: string): Promise<BitcoinTransac
// Calculate amount for this address
let amount = 0;
let fee = 0;
let fee: number | undefined = undefined;
if (isReceived) {
// Sum all outputs to this address
@@ -86,7 +86,7 @@ async function fetchBitcoinTransactions(address: string): Promise<BitcoinTransac
txid: tx.txid,
type: isReceived ? 'received' : 'sent',
amount: Math.abs(amount),
fee: isSent ? fee : undefined,
fee: fee,
address: address,
confirmations: tx.status.confirmed ? (tx.status.block_height ? 1 : 0) : 0, // Simplified
blockHeight: tx.status.block_height,