Skip to content

Commit

Permalink
fix: use vsize when calculating feeRate
Browse files Browse the repository at this point in the history
Display vSize in summary table
  • Loading branch information
kyleleow committed Jan 9, 2023
1 parent 03914ca commit 2a63846
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/transactions/[txid].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ export default function TransactionPage(
const dftx: DfTx<any> | undefined = getDfTx(props.vouts);
const isDeFiTransaction = dftx !== undefined;
const fee = getTransactionFee(props.transaction, props.vins, dftx);
const feeRate = fee.multipliedBy(100000000).dividedBy(props.transaction.size);
const feeRate = fee
.multipliedBy(100000000)
.dividedBy(props.transaction.vSize);

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ function SummaryTableListRight(props: {
<AdaptiveList.Row name="Size" testId="transaction-detail-size">
{props.transaction.size} bytes
</AdaptiveList.Row>
<AdaptiveList.Row name="vSize" testId="transaction-detail-vsize">
{props.transaction.vSize} bytes
</AdaptiveList.Row>
<AdaptiveList.Row
name="Received Time"
testId="transaction-detail-received-time"
Expand Down

0 comments on commit 2a63846

Please sign in to comment.