Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FE-1281 | Move pools router into local tRPC router #4005

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/web/components/complex/add-conc-liquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const AddConcLiquidity: FunctionComponent<
const { queryQuasarVaults } = queriesExternalStore;
const { vaults: quasarVaults } = queryQuasarVaults.get(poolId);

const { data: pool } = api.edge.pools.getPool.useQuery({
const { data: pool } = api.local.pools.getPool.useQuery({
poolId,
});
deividaspetraitis marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
2 changes: 1 addition & 1 deletion packages/web/components/complex/pools-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const PoolsTable = (props: PropsWithChildren<PoolsTableProps>) => {
isFetchingNextPage,
hasNextPage,
fetchNextPage,
} = api.edge.pools.getPools.useInfiniteQuery(
} = api.local.pools.getPools.useInfiniteQuery(
{
limit,
search: filters.searchQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function useUserPositionsData(address: string | undefined) {
const hasPositions = Boolean(positions?.length);

const { data: allMyPoolDetails, isLoading: isLoadingMyPoolDetails } =
api.edge.pools.getUserPools.useQuery(
api.local.pools.getUserPools.useQuery(
{
userOsmoAddress: address ?? "",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function useAddConcentratedLiquidityConfig(
const address = account?.address ?? "";

const { data: pool, isFetched: isPoolFetched } =
api.edge.pools.getPool.useQuery(
api.local.pools.getPool.useQuery(
{ poolId },
{
refetchInterval: 5_000, // 5 seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function useHistoricalAndLiquidityData(
[config]
);

const { data: pool } = api.edge.pools.getPool.useQuery(
const { data: pool } = api.local.pools.getPool.useQuery(
{
poolId,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web/modals/add-liquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const AddLiquidityModal: FunctionComponent<
useAddConcentratedLiquidityConfig(chainStore, chainId, poolId);

// initialize pool data stores once root pool store is loaded
const { data: pool } = api.edge.pools.getPool.useQuery({ poolId });
const { data: pool } = api.local.pools.getPool.useQuery({ poolId });

const config =
pool?.type === "concentrated" ? addConliqConfig : addLiquidityConfig;
Expand Down
2 changes: 1 addition & 1 deletion packages/web/pages/pool/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Pool: FunctionComponent<Props> = ({
const { t } = useTranslation();
const { isMobile } = useWindowSize();

const { data: pool, isError } = api.edge.pools.getPool.useQuery({ poolId });
const { data: pool, isError } = api.local.pools.getPool.useQuery({ poolId });

const [showTradeModal, setShowTradeModal] = useState(false);

Expand Down
2 changes: 2 additions & 0 deletions packages/web/server/api/local-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
paramsRouter,
portfolioRouter,
swapRouter,
poolsRouter,
deividaspetraitis marked this conversation as resolved.
Show resolved Hide resolved
} from "@osmosis-labs/trpc";

import { localBridgeTransferRouter } from "~/server/api/routers/local-bridge-transfer";
Expand All @@ -25,4 +26,5 @@ export const localRouter = createTRPCRouter({
portfolio: portfolioRouter,
params: paramsRouter,
orderbooks: orderbookRouter,
pools: poolsRouter,
});
Loading