Skip to content

Commit

Permalink
fix: moved active orders to local router
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Aug 28, 2024
1 parent 1b6a6e1 commit 843bb07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/web/hooks/limit-orders/use-orderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export type DisplayableLimitOrder = MappedLimitOrder;
export const useOrderbookAllActiveOrders = ({
userAddress,
pageSize = 10,
refetchInterval = 2000,
refetchInterval = 5000,
}: {
userAddress: string;
pageSize?: number;
Expand All @@ -282,7 +282,7 @@ export const useOrderbookAllActiveOrders = ({
hasNextPage,
refetch,
isRefetching,
} = api.edge.orderbooks.getAllOrdersSQS.useInfiniteQuery(
} = api.local.orderbooks.getAllOrdersSQS.useInfiniteQuery(
{
userOsmoAddress: userAddress,
limit: pageSize,
Expand Down Expand Up @@ -343,7 +343,7 @@ export const useOrderbookClaimableOrders = ({
isLoading,
isFetching,
refetch,
} = api.edge.orderbooks.getAllOrdersSQS.useInfiniteQuery(
} = api.local.orderbooks.getAllOrdersSQS.useInfiniteQuery(
{
userOsmoAddress: userAddress,
filter: "filled",
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 @@ -4,6 +4,7 @@ import {
concentratedLiquidityRouter,
createTRPCRouter,
oneClickTradingRouter,
orderbookRouter,
paramsRouter,
portfolioRouter,
swapRouter,
Expand All @@ -23,4 +24,5 @@ export const localRouter = createTRPCRouter({
bridgeTransfer: localBridgeTransferRouter,
portfolio: portfolioRouter,
params: paramsRouter,
orderbooks: orderbookRouter,
});
3 changes: 1 addition & 2 deletions packages/web/stores/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export function refetchUserQueries(apiUtils: ReturnType<typeof api.useUtils>) {
apiUtils.local.balances.getUserBalances.invalidate();
apiUtils.local.bridgeTransfer.getSupportedAssetsBalances.invalidate();
apiUtils.edge.assets.getImmersiveBridgeAssets.invalidate();
apiUtils.edge.orderbooks.getAllOrders.invalidate();
apiUtils.edge.orderbooks.getAllOrdersSQS.invalidate();
apiUtils.local.orderbooks.getAllOrdersSQS.invalidate();
}

const EXCEEDS_1CT_NETWORK_FEE_LIMIT_TOAST_ID = "exceeds-1ct-network-fee-limit";
Expand Down

0 comments on commit 843bb07

Please sign in to comment.