diff --git a/packages/ui/src/price-tag.tsx b/packages/ui/src/price-tag.tsx index 2febedc7..62d6d41f 100644 --- a/packages/ui/src/price-tag.tsx +++ b/packages/ui/src/price-tag.tsx @@ -1,4 +1,3 @@ -import { formatUnits } from "viem"; import type { PropsWithClassName } from "."; import { cn, formatUnits } from "."; @@ -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) { if (!price || !currency) { return null; @@ -27,7 +32,6 @@ export function PriceTag({ className, )} > -

{formatUnits(price, 18)} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 711f68f0..69b12e44 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -87,14 +87,12 @@ importers: '@ark-project/react': specifier: ^1.1.2 version: 1.1.2(typescript@5.5.4)(viem@2.21.1(typescript@5.5.4)(zod@3.23.8)) + '@avnu/avnu-sdk': + specifier: ^2.1.1 + version: 2.1.1(ethers@6.13.1)(qs@6.13.1)(starknet@6.11.0) '@cartridge/connector': specifier: ^0.3.43 version: 0.3.43(get-starknet-core@3.3.3(starknet@6.11.0))(react@18.3.1) - specifier: ^1.1.1 - version: 1.1.1(typescript@5.5.4)(viem@2.17.3(typescript@5.5.4)(zod@3.23.8)) - '@avnu/avnu-sdk': - specifier: ^2.1.1 - version: 2.1.1(ethers@6.13.1)(qs@6.13.0)(starknet@6.11.0) '@hookform/error-message': specifier: ^2.0.1 version: 2.0.1(react-dom@18.3.1(react@18.3.1))(react-hook-form@7.52.1(react@18.3.1))(react@18.3.1) @@ -411,8 +409,7 @@ importers: version: 7.35.0(eslint@9.9.1(jiti@1.21.6)) eslint-plugin-react-hooks: specifier: rc - version: 5.1.0-rc-83825814-20241015(eslint@9.9.1(jiti@1.21.6)) - version: 5.1.0-rc-45804af1-20241021(eslint@9.9.1(jiti@1.21.6)) + version: 5.1.0-rc.1(eslint@9.9.1(jiti@1.21.6)) eslint-plugin-turbo: specifier: ^2.0.13 version: 2.1.0(eslint@9.9.1(jiti@1.21.6)) @@ -2113,7 +2110,7 @@ packages: peerDependencies: '@types/react': '*' '@types/react-dom': '*' - react: 18.3.1 + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -2191,7 +2188,7 @@ packages: peerDependencies: '@types/react': '*' '@types/react-dom': '*' - react: 18.3.1 + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -4041,10 +4038,8 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - eslint-plugin-react-hooks@5.1.0-rc-83825814-20241015: - resolution: {integrity: sha512-lOSSyz+7A2yG93dFXY09QwCDFaCf4/oniscyMcS22DHT+BBrCH7SNKJt2bD6pG1ovnPYzGWYcXYM2GVV8eIckg==} - eslint-plugin-react-hooks@5.1.0-rc-45804af1-20241021: - resolution: {integrity: sha512-q8MQ4OQ0TYmKT6eS2ZObxmA+OvUrd27MN72zU5b3ib7Q+1I78C9aUzy1GelM8ttgkEkwSxE+qDBgV+K84tjt+Q==} + eslint-plugin-react-hooks@5.1.0-rc.1: + resolution: {integrity: sha512-nAD017D/00XFwjP4F7cXaIbCxQ9A4pGaqjLs5347px37w/WclOtPqz8bBiTQFoj+teVQei6Ahr1h1aZiuaXMSw==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 @@ -5538,8 +5533,8 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - qs@6.13.0: - resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} + qs@6.13.1: + resolution: {integrity: sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==} engines: {node: '>=0.6'} query-string@7.1.3: @@ -6765,10 +6760,10 @@ snapshots: - typescript - viem - '@avnu/avnu-sdk@2.1.1(ethers@6.13.1)(qs@6.13.0)(starknet@6.11.0)': + '@avnu/avnu-sdk@2.1.1(ethers@6.13.1)(qs@6.13.1)(starknet@6.11.0)': dependencies: ethers: 6.13.1 - qs: 6.13.0 + qs: 6.13.1 starknet: 6.11.0 '@babel/code-frame@7.24.7': @@ -10893,8 +10888,7 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - eslint-plugin-react-hooks@5.1.0-rc-83825814-20241015(eslint@9.9.1(jiti@1.21.6)): - eslint-plugin-react-hooks@5.1.0-rc-45804af1-20241021(eslint@9.9.1(jiti@1.21.6)): + eslint-plugin-react-hooks@5.1.0-rc.1(eslint@9.9.1(jiti@1.21.6)): dependencies: eslint: 9.9.1(jiti@1.21.6) @@ -12538,7 +12532,7 @@ snapshots: punycode@2.3.1: {} - qs@6.13.0: + qs@6.13.1: dependencies: side-channel: 1.0.6