Skip to content

Commit

Permalink
Merge pull request solana-foundation#234 from Arrowana/feat/compute-u…
Browse files Browse the repository at this point in the history
…nits-consumed

feat: Show compute units consumed
  • Loading branch information
joncinque authored Apr 7, 2023
2 parents 31560e2 + 8e4846f commit fa28f1a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/pages/TransactionDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ function StatusCard({

const transactionWithMeta = details?.data?.transactionWithMeta;
const fee = transactionWithMeta?.meta?.fee;
const computeUnitsConsumed = transactionWithMeta?.meta?.computeUnitsConsumed;
const transaction = transactionWithMeta?.transaction;
const blockhash = transaction?.message.recentBlockhash;
const version = transactionWithMeta?.version;
Expand Down Expand Up @@ -332,6 +333,15 @@ function StatusCard({
</tr>
)}

{computeUnitsConsumed !== undefined && (
<tr>
<td>Compute units consumed</td>
<td className="text-lg-end">
{computeUnitsConsumed.toLocaleString("en-US")}
</td>
</tr>
)}

{version !== undefined && (
<tr>
<td>Transaction Version</td>
Expand Down

0 comments on commit fa28f1a

Please sign in to comment.