Skip to content

Commit

Permalink
Best gas unit (#504)
Browse files Browse the repository at this point in the history
* feat: Find best unit for Blob gas price

* chore: update changeset

* Update .changeset/hip-maps-agree.md

Co-authored-by: elessar.eth <[email protected]>

* chore: update changeset

---------

Co-authored-by: elessar.eth <[email protected]>
  • Loading branch information
luis-herasme and PJColombo authored Aug 19, 2024
1 parent 06eda30 commit 7de9681
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-maps-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@blobscan/web": patch
---

Updated latest blob gas price metric to display the most suitable unit, replacing the previously fixed `Gwei` format
1 change: 0 additions & 1 deletion apps/web/src/components/ExplorerDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export function ExplorerDetails() {
amount={BigInt(
Math.round(Number(latestBlock.blobGasPrice.toString()))
)}
toUnit="Gwei"
/>
),
},
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/pages/block/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Card } from "~/components/Cards/Card";
import { BlobTransactionCard } from "~/components/Cards/SurfaceCards/BlobTransactionCard";
import { Copyable } from "~/components/CopyToClipboard";
import { BlobGasUsageDisplay } from "~/components/Displays/BlobGasUsageDisplay";
import { StandardEtherUnitDisplay } from "~/components/Displays/StandardEtherUnitDisplay";
import { EtherUnitDisplay } from "~/components/Displays/EtherUnitDisplay";
import { DetailsLayout } from "~/components/Layouts/DetailsLayout";
import type { DetailsLayoutProps } from "~/components/Layouts/DetailsLayout";
import { Link } from "~/components/Link";
Expand Down Expand Up @@ -113,7 +113,7 @@ const Block: NextPage = function () {
},
{
name: "Blob Gas Price",
value: <StandardEtherUnitDisplay amount={blockData.blobGasPrice} />,
value: <EtherUnitDisplay amount={blockData.blobGasPrice} />,
},
{
name: "Blob Gas Used",
Expand Down

0 comments on commit 7de9681

Please sign in to comment.