diff --git a/app/components/pools/PoolTokenImage.tsx b/app/components/pools/PoolTokenImage.tsx index ab44095..53860a0 100644 --- a/app/components/pools/PoolTokenImage.tsx +++ b/app/components/pools/PoolTokenImage.tsx @@ -30,7 +30,7 @@ export const PoolTokenImage = ({ {showChainIcon && token?.chainId ? (
diff --git a/app/lib/chain.test.ts b/app/lib/chain.test.ts index 66eb12b..a41d586 100644 --- a/app/lib/chain.test.ts +++ b/app/lib/chain.test.ts @@ -1,14 +1,14 @@ import { arbitrum, treasureTopaz } from "viem/chains"; import { describe, expect, it } from "vitest"; -import { getBlockExplorerUrl } from "./chain"; +import { getBlockExplorer } from "./chain"; describe("chain utils", () => { - it("should get block explorer url", () => { - expect(getBlockExplorerUrl({ chainId: treasureTopaz.id })).toBe( + it("should get block explorer", () => { + expect(getBlockExplorer({ chainId: treasureTopaz.id })).toBe( treasureTopaz.blockExplorers.default, ); - expect(getBlockExplorerUrl({ chainId: 0 })).toBe( + expect(getBlockExplorer({ chainId: 0 })).toBe( arbitrum.blockExplorers.default, ); }); diff --git a/app/lib/chain.ts b/app/lib/chain.ts index f317ae1..53c7225 100644 --- a/app/lib/chain.ts +++ b/app/lib/chain.ts @@ -1,7 +1,7 @@ import { arbitrum } from "viem/chains"; import { CHAIN_ID_TO_CHAIN } from "~/consts"; -export const getBlockExplorerUrl = ({ chainId }: { chainId: number }) => { +export const getBlockExplorer = ({ chainId }: { chainId: number }) => { const chain = CHAIN_ID_TO_CHAIN[chainId] ?? arbitrum; return chain.blockExplorers?.default ?? arbitrum.blockExplorers.default; }; diff --git a/app/routes/pools_.($chainId).$address.tsx b/app/routes/pools_.($chainId).$address.tsx index dec957f..fc80e65 100644 --- a/app/routes/pools_.($chainId).$address.tsx +++ b/app/routes/pools_.($chainId).$address.tsx @@ -39,7 +39,7 @@ import { } from "~/api/tokens.server"; import { fetchUserPosition } from "~/api/user.server"; import { Badge } from "~/components/Badge"; -import { ExternalLinkIcon, LoaderIcon } from "~/components/Icons"; +import { ExternalLinkIcon, LoaderIcon, SwapIcon } from "~/components/Icons"; import { SelectionPopup } from "~/components/SelectionPopup"; import { SettingsDropdownMenu } from "~/components/SettingsDropdownMenu"; import { PoolDepositTab } from "~/components/pools/PoolDepositTab"; @@ -62,7 +62,7 @@ import { useSubscribeToIncentives } from "~/hooks/useSubscribeToIncentives"; import { useTokenBalance } from "~/hooks/useTokenBalance"; import { useWithdrawBatch } from "~/hooks/useWithdrawBatch"; import { truncateEthAddress } from "~/lib/address"; -import { getBlockExplorerUrl } from "~/lib/chain"; +import { getBlockExplorer } from "~/lib/chain"; import { formatAmount, formatUSD } from "~/lib/currency"; import { ENV } from "~/lib/env.server"; import { @@ -191,7 +191,7 @@ export default function PoolDetailsPage() { const { switchChainAsync } = useSwitchChain(); const [poolActivityFilter, setPoolActivityFilter] = useState>(); - const blockExplorer = getBlockExplorerUrl({ chainId: pool.chainId }); + const blockExplorer = getBlockExplorer({ chainId: pool.chainId }); const [tab, setTab] = useState("deposit"); const [ optimisticSubscribedIncentiveIds, @@ -339,21 +339,30 @@ export default function PoolDetailsPage() {
-
- -
- - {pool.name} - - - LP Fees: {formatPercent(pool.lpFee, 3)} - +
+
+ +
+ + {pool.name} + + + LP Fees: {formatPercent(pool.lpFee, 3)} + +
+ + + Swap Pair +
    {[pool.token0, pool.token1].map( @@ -591,8 +600,8 @@ export default function PoolDetailsPage() { ) : null}
) : ( -
-
+
+
Start staking and{" "} @@ -600,7 +609,7 @@ export default function PoolDetailsPage() {