Skip to content

Commit

Permalink
fix: package-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
MartianGreed committed Dec 5, 2024
1 parent 312f1ce commit b22b35e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
8 changes: 6 additions & 2 deletions packages/ui/src/price-tag.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { formatUnits } from "viem";

import type { PropsWithClassName } from ".";
import { cn, formatUnits } from ".";
Expand All @@ -9,12 +8,18 @@ export type TokenSymbol = "eth" | "strk" | "lords" | "starknet" | "ethereum";
interface PriceTagProps {
price: number | bigint | string;
token?: TokenSymbol;
currency?: {
contract: string;
symbol: string;
decimals: number;
};
}

export function PriceTag({
className,
price,
token = "ethereum",
currency,
}: PropsWithClassName<PriceTagProps>) {
if (!price || !currency) {
return null;
Expand All @@ -27,7 +32,6 @@ export function PriceTag({
className,
)}
>
<CurrencyLogo token={token} />
<p className="whitespace-nowrap">
{formatUnits(price, 18)}
<span className="text-muted-foreground"> <CurrencySymbol token={token} /></span>
Expand Down
34 changes: 14 additions & 20 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 b22b35e

Please sign in to comment.