mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-06 08:47:23 +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' ? '-' : '+'}
|
{tx.type === 'sent' ? '-' : '+'}
|
||||||
{formatBitcoinAmount(tx.amount)}
|
{formatBitcoinAmount(tx.amount)}
|
||||||
</div>
|
</div>
|
||||||
{tx.fee && tx.type === 'sent' && (
|
{tx.fee !== undefined && tx.fee > 0 && tx.type === 'sent' && (
|
||||||
<div className="text-xs text-muted-foreground mt-1">
|
<div className="text-xs text-muted-foreground mt-1">
|
||||||
Fee: {formatBitcoinAmount(tx.fee)}
|
Fee: {formatBitcoinAmount(tx.fee)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ async function fetchBitcoinTransactions(address: string): Promise<BitcoinTransac
|
|||||||
|
|
||||||
// Calculate amount for this address
|
// Calculate amount for this address
|
||||||
let amount = 0;
|
let amount = 0;
|
||||||
let fee = 0;
|
let fee: number | undefined = undefined;
|
||||||
|
|
||||||
if (isReceived) {
|
if (isReceived) {
|
||||||
// Sum all outputs to this address
|
// Sum all outputs to this address
|
||||||
@@ -86,7 +86,7 @@ async function fetchBitcoinTransactions(address: string): Promise<BitcoinTransac
|
|||||||
txid: tx.txid,
|
txid: tx.txid,
|
||||||
type: isReceived ? 'received' : 'sent',
|
type: isReceived ? 'received' : 'sent',
|
||||||
amount: Math.abs(amount),
|
amount: Math.abs(amount),
|
||||||
fee: isSent ? fee : undefined,
|
fee: fee,
|
||||||
address: address,
|
address: address,
|
||||||
confirmations: tx.status.confirmed ? (tx.status.block_height ? 1 : 0) : 0, // Simplified
|
confirmations: tx.status.confirmed ? (tx.status.block_height ? 1 : 0) : 0, // Simplified
|
||||||
blockHeight: tx.status.block_height,
|
blockHeight: tx.status.block_height,
|
||||||
|
|||||||
Reference in new issue
Block a user