diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 03fb62c..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,123 +0,0 @@ -name: ci - -on: - push: - pull_request: - -# This workflow only reads the repo — nothing publishes, comments, or deploys. -permissions: - contents: read - -# Cancel superseded runs on the same ref. -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - # --------------------------------------------------------------------------- - # Workspace packages (apps/*, packages/*) — pnpm. - # `contracts/` is deliberately NOT a workspace package; it has its own job. - # --------------------------------------------------------------------------- - js: - name: typecheck / lint / test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10.33.4 - - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - # @lcai/abis is generated-but-committed and imported by api, indexer and - # web. It must be built before anything typechecks against it. - - name: Build @lcai/abis - run: pnpm --filter @lcai/abis build - - - name: Typecheck - run: pnpm typecheck - - - name: Lint - run: pnpm lint - - - name: Test - run: pnpm test - - # --------------------------------------------------------------------------- - # Solidity — npm, not pnpm. `contracts/` has its own package-lock.json. - # --------------------------------------------------------------------------- - contracts: - name: solidity - runs-on: ubuntu-latest - defaults: - run: - working-directory: contracts - steps: - - uses: actions/checkout@v4 - - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: npm - cache-dependency-path: contracts/package-lock.json - - - name: Install dependencies - run: npm ci - - - name: Compile - run: npx hardhat compile - - # `--network hardhat` is MANDATORY. hardhat.config.ts sets - # `defaultNetwork: "lcaiTestnet"`, which points at the live public testnet - # (https://rpc.testnet.lightchain.ai). Omitting the flag targets it. - # ALCHEMY_API_KEY is intentionally unset: without it forking is disabled - # and the suite runs entirely against the in-repo Uniswap V2 mocks. - - name: Test - run: npx hardhat test --network hardhat - - # --------------------------------------------------------------------------- - # Dependency advisories — reported, not enforced. - # --------------------------------------------------------------------------- - audit: - name: dependency audit - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 10.33.4 - - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - # Non-blocking. As of f9db5a6 `pnpm audit --audit-level high` reports - # `4 low | 57 moderate | 42 high | 2 critical` — those are path - # instances; deduplicated it is 1 unique critical and 38 unique high - # (84 unique advisories in total). - # Both "criticals" are the same vitest <3.2.6 advisory, reached once via - # apps/web and once via apps/api. It is dev-only and exploitable only - # while the Vitest UI server is listening, so it is NOT runtime-reachable. - # Flip to blocking once the runtime-reachable advisories (next, - # @fastify/static, ws, socket.io-parser, find-my-way, drizzle-orm) are - # cleared. - - name: Audit - run: pnpm audit --audit-level high - continue-on-error: true diff --git a/apps/web/components/home/token-card.tsx b/apps/web/components/home/token-card.tsx index 8c3aa11..8c98a04 100644 --- a/apps/web/components/home/token-card.tsx +++ b/apps/web/components/home/token-card.tsx @@ -2,7 +2,6 @@ import Link from "next/link"; import { useMemo } from "react"; import { CheckCircle2 } from "lucide-react"; -import dayjs from "@/lib/dayjs"; import { ipfsToHttp, weiToNative } from "@/lib/ipfs"; import { formatUsd } from "@/lib/utils"; import useNativePrice from "@/hooks/useNativePrice"; diff --git a/apps/web/components/token/token-trade-table.tsx b/apps/web/components/token/token-trade-table.tsx index 09c7cce..7dbbb93 100644 --- a/apps/web/components/token/token-trade-table.tsx +++ b/apps/web/components/token/token-trade-table.tsx @@ -7,8 +7,7 @@ import { useSuspenseQuery } from "@tanstack/react-query"; import dayjs from "@/lib/dayjs"; import useCurrentChain from "@/hooks/useCurrentChain"; import tokenQuery from "@/queries/tokenQuery"; -import useNativePrice from "@/hooks/useNativePrice"; -import { formatBigNumber, formatPrice, formatUsdPrice } from "@/lib/utils"; +import { formatBigNumber } from "@/lib/utils"; import type { Trade } from "@/types"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@lcai/ui/components/table"; import { Tooltip, TooltipContent, TooltipTrigger } from "@lcai/ui/components/tooltip"; @@ -19,7 +18,6 @@ export function TokenTradeTable({ trades }: { trades?: Trade[] }) { const { address } = useParams<{ address: string }>(); const { data: token } = useSuspenseQuery(tokenQuery(address)); const explorer = chain.blockExplorers?.default.url; - const nativePrice = useNativePrice(); const nativeSymbol = chain.nativeCurrency.symbol; return ( @@ -37,7 +35,7 @@ export function TokenTradeTable({ trades }: { trades?: Trade[] }) { {!trades?.length ? ( - + No trades yet @@ -104,9 +102,10 @@ export function TokenTradeTable({ trades }: { trades?: Trade[] }) { href={`${explorer}/tx/${trade.txHash}`} target="_blank" rel="noopener noreferrer" - className="hover:underline" + className="inline-flex items-center gap-1 hover:underline" > {trade.txHash.slice(0, 6)}... + ) : ( <>{trade.txHash.slice(0, 6)}... diff --git a/apps/web/package.json b/apps/web/package.json index c1097bf..442b664 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -11,7 +11,7 @@ "start": "next start", "lint": "eslint --max-warnings 24", "format": "prettier --write \"**/*.{ts,tsx}\"", - "typecheck": "tsc --noEmit", + "typecheck": "next typegen && tsc --noEmit", "test": "vitest run" }, "dependencies": { diff --git a/apps/web/types/next-images.d.ts b/apps/web/types/next-images.d.ts deleted file mode 100644 index 668afcc..0000000 --- a/apps/web/types/next-images.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Declarations for static image imports (`import light from "…/sun-01.svg"`). -// -// Next normally supplies these through `next-env.d.ts`, but that file is -// generated by `next dev` / `next build` and is gitignored, so a clean checkout -// — CI — typechecks without it and every image import fails with TS2307. This -// references Next's own declarations rather than restating them, so the types -// stay whatever the installed Next says they are. -/// - -export {};