diff --git a/src/components/element/chain/ChainTableRow.tsx b/src/components/element/chain/ChainTableRow.tsx index 8c17d02..3d916b6 100644 --- a/src/components/element/chain/ChainTableRow.tsx +++ b/src/components/element/chain/ChainTableRow.tsx @@ -1,9 +1,6 @@ import type { Chain } from "@merkl/api"; import { Link } from "@remix-run/react"; -import { Group, Icon } from "dappkit"; -import type { BoxProps } from "dappkit"; -import { Title } from "dappkit"; -import { mergeClass } from "dappkit"; +import { type BoxProps, Group, Icon, Title, mergeClass } from "dappkit"; import type { TagTypes } from "../Tag"; import { ChainRow } from "./ChainTable"; diff --git a/src/components/element/opportunity/OpportunityCell.tsx b/src/components/element/opportunity/OpportunityCell.tsx index b09f34a..f156779 100644 --- a/src/components/element/opportunity/OpportunityCell.tsx +++ b/src/components/element/opportunity/OpportunityCell.tsx @@ -1,8 +1,21 @@ import { Link } from "@remix-run/react"; import type { BoxProps } from "dappkit"; -import { Box, Button, Divider, Dropdown, Fmt, Group, Icon, Icons, PrimitiveTag, Text, Title, Value } from "dappkit"; -import { mergeClass } from "dappkit"; -import { useOverflowingRef } from "dappkit"; +import { + Box, + Button, + Divider, + Dropdown, + Fmt, + Group, + Icon, + Icons, + PrimitiveTag, + Text, + Title, + Value, + mergeClass, + useOverflowingRef, +} from "dappkit"; import { useMemo } from "react"; import merklConfig from "../../../config"; import type { OpportunityNavigationMode } from "../../../config/opportunity"; diff --git a/src/components/element/opportunity/OpportunityTableRow.tsx b/src/components/element/opportunity/OpportunityTableRow.tsx index 151b664..4144276 100644 --- a/src/components/element/opportunity/OpportunityTableRow.tsx +++ b/src/components/element/opportunity/OpportunityTableRow.tsx @@ -1,7 +1,6 @@ import { Link } from "@remix-run/react"; import type { BoxProps } from "dappkit"; -import { Dropdown, Group, Icon, Icons, PrimitiveTag, Text, Title, Value } from "dappkit"; -import { FormatterService as Fmt, mergeClass } from "dappkit"; +import { Dropdown, Fmt, Group, Icon, Icons, PrimitiveTag, Text, Title, Value, mergeClass } from "dappkit"; import { EventBlocker } from "dappkit"; import { useOverflowingRef } from "dappkit"; import { useMemo } from "react"; diff --git a/src/components/element/participate/Participate.tsx b/src/components/element/participate/Participate.tsx index 8c54f3f..ab8e4d2 100644 --- a/src/components/element/participate/Participate.tsx +++ b/src/components/element/participate/Participate.tsx @@ -30,7 +30,7 @@ export default function Participate({ displayLinks, hideInteractor, }: ParticipateProps) { - const [tokenAddress, setTokenAddress] = useState(); + const [tokenAddress, setTokenAddress] = useState(""); const [amount, setAmount] = useState(); const [mode] = useState<"deposit" | "withdraw">(typeof displayMode === "string" ? displayMode : "deposit"); @@ -130,7 +130,12 @@ export default function Participate({ Slippage { + if (!!v) setSlippage(v); + }, + ]} size="sm" className="max-w-[20ch] !rounded-sm+sm" prefix={ diff --git a/src/hooks/resources/useReward.tsx b/src/hooks/resources/useReward.tsx index f6ffdfb..98c7c43 100644 --- a/src/hooks/resources/useReward.tsx +++ b/src/hooks/resources/useReward.tsx @@ -6,7 +6,7 @@ import { InteractionService } from "../../modules/interaction/interaction.servic export default function useReward(reward?: Reward, userAddress?: string, tokenAddresses?: Set) { const [claimTransaction, setClaimTransaction] = useState(); const { sponsorTransactions, chainId } = useWalletContext(); - const [loading, setLoading] = useState(); + const [loading, setLoading] = useState(false); const payload = useMemo(() => { if (!userAddress || !reward) return; diff --git a/src/hooks/useBalances.tsx b/src/hooks/useBalances.tsx index 6acaeaf..59686c8 100644 --- a/src/hooks/useBalances.tsx +++ b/src/hooks/useBalances.tsx @@ -1,7 +1,7 @@ import { useWalletContext } from "dappkit"; import { useCallback, useEffect, useMemo, useState } from "react"; import { create } from "zustand"; -import type { api as clientApi } from "../api/index.client"; +import type { api as clientApi } from "../api/index"; import { InteractionService } from "../modules/interaction/interaction.service"; type TokenBalances = Awaited>["data"]; diff --git a/src/hooks/useMerklSearch.tsx b/src/hooks/useMerklSearch.tsx index 5a0302f..31f718c 100644 --- a/src/hooks/useMerklSearch.tsx +++ b/src/hooks/useMerklSearch.tsx @@ -21,7 +21,7 @@ export function useMerklSearch(input: string, include?: Searchable[]) { const fetchers: { [S in Searchable]: (i: string) => Promise; } = { - chain: async i => (await api.v4.chains.index.get({ query: { search: i } }))?.data, + chain: async i => (await api.v4.chains.index.get({ query: { name: i } }))?.data, opportunity: async i => (await api.v4.opportunities.index.get({ query: { name: i } }))?.data, protocol: async i => (await api.v4.protocols.index.get({ query: { name: i } }))?.data, };