Skip to content

Commit

Permalink
fix disconnect still show warning number
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Aug 29, 2023
1 parent ed6f02f commit 492f323
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pages/SwapV3/Tabs/LimitTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ export default function LimitTab({ onClick }: Props) {

const isLimitPage = pathname.startsWith(APP_PATHS.LIMIT)
const isSupport = isSupportLimitOrder(chainId)
const { data: numberOfInsufficientFundOrders } = useGetNumberOfInsufficientFundOrdersQuery(

const skip = !account || !isSupport
const { data } = useGetNumberOfInsufficientFundOrdersQuery(
{ chainId, maker: account || '' },
{ skip: !account || !isSupport, pollingInterval: 10_000 },
{ skip, pollingInterval: 10_000 },
)
const numberOfInsufficientFundOrders = skip ? undefined : data

if (!isSupport) {
return null
Expand Down

0 comments on commit 492f323

Please sign in to comment.