Skip to content

Commit

Permalink
chore: fix @blobscan/eth-units name discrepancy (#639)
Browse files Browse the repository at this point in the history
* chore: drop unused `@blobscan/eth-units` dep from root package

* chore: rename `@blobscan/eth-units` to `@blobscan/eth-format`

* chore: remove package lock files

* chore(web): re-add `@blobscan/eth-format` dep
  • Loading branch information
PJColombo authored Nov 21, 2024
1 parent f21f6fc commit c1f500e
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .changeset/pretty-pigs-type.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@blobscan/eth-units": minor
"@blobscan/eth-format": minor
---

Made unit display optional when formatting wei amounts
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@blobscan/dayjs": "workspace:^0.1.0",
"@blobscan/db": "workspace:^0.11.0",
"@blobscan/env": "workspace:^0.0.1",
"@blobscan/eth-units": "workspace:^0.0.1",
"@blobscan/eth-format": "workspace:^0.0.1",
"@blobscan/open-telemetry": "workspace:^0.0.8",
"@blobscan/rollups": "workspace:^0.2.0",
"@floating-ui/react": "^0.26.23",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Cards/MetricCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cn from "classnames";
import "react-loading-skeleton/dist/skeleton.css";
import Skeleton from "react-loading-skeleton";

import { prettyFormatWei } from "@blobscan/eth-units";
import { prettyFormatWei } from "@blobscan/eth-format";

import {
formatBytes,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from "react";
import type { EChartOption } from "echarts";

import { formatWei, prettyFormatWei } from "@blobscan/eth-units";
import { formatWei, prettyFormatWei } from "@blobscan/eth-format";

import { ChartCard } from "~/components/Cards/ChartCard";
import { useScaledWeiAmounts } from "~/hooks/useScaledWeiAmounts";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from "react";
import type { EChartOption } from "echarts";

import { formatWei, prettyFormatWei } from "@blobscan/eth-units";
import { formatWei, prettyFormatWei } from "@blobscan/eth-format";

import { ChartCard } from "~/components/Cards/ChartCard";
import { useScaledWeiAmounts } from "~/hooks/useScaledWeiAmounts";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Charts/Block/DailyBlobFeeChart.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from "react";
import type { EChartOption } from "echarts";

import { formatWei, prettyFormatWei } from "@blobscan/eth-units";
import { formatWei, prettyFormatWei } from "@blobscan/eth-format";

import { ChartCard } from "~/components/Cards/ChartCard";
import { useScaledWeiAmounts } from "~/hooks/useScaledWeiAmounts";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from "react";
import type { EChartOption } from "echarts";

import { formatWei, prettyFormatWei } from "@blobscan/eth-units";
import { formatWei, prettyFormatWei } from "@blobscan/eth-format";

import { ChartCard } from "~/components/Cards/ChartCard";
import { useScaledWeiAmounts } from "~/hooks/useScaledWeiAmounts";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Displays/EtherUnitDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from "react";

import { formatWei } from "@blobscan/eth-units";
import type { EtherUnit, FormatOptions } from "@blobscan/eth-units";
import { formatWei } from "@blobscan/eth-format";
import type { EtherUnit, FormatOptions } from "@blobscan/eth-format";

type Props = {
amount: bigint | number | string;
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Displays/StandardEtherUnitDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FormatOptions } from "@blobscan/eth-units";
import { formatWei } from "@blobscan/eth-units";
import type { FormatOptions } from "@blobscan/eth-format";
import { formatWei } from "@blobscan/eth-format";

import { EtherUnitDisplay } from "./EtherUnitDisplay";

Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/hooks/useScaledWeiAmounts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useMemo } from "react";

import type { EtherUnit } from "@blobscan/eth-units";
import { convertWei, findBestUnit } from "@blobscan/eth-units";
import type { EtherUnit } from "@blobscan/eth-format";
import { convertWei, findBestUnit } from "@blobscan/eth-format";

type ScaledWeiAmounts = {
unit: EtherUnit;
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
},
"dependencies": {
"@blobscan/eslint-config": "workspace:^0.0.1",
"@blobscan/eth-units": "workspace:^0.0.1",
"@blobscan/svgo-config": "workspace:^0.0.1",
"@blobscan/tailwind-config": "workspace:^0.0.1",
"@blobscan/test": "workspace:^0.0.1",
Expand Down
13 changes: 0 additions & 13 deletions packages/eth-format/package-lock.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/eth-format/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@blobscan/eth-units",
"name": "@blobscan/eth-format",
"version": "0.0.1",
"main": "./index.ts",
"types": "./index.ts",
Expand Down
115 changes: 0 additions & 115 deletions packages/optimism-decoder/package-lock.json

This file was deleted.

21 changes: 9 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c1f500e

Please sign in to comment.