mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 16:33:36 +00:00
on-chain fee display bug
This commit is contained in:
1 parent
aff1b0add5
commit
9e29d18a70
2 files changed
+3
-3
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user