From 4d03ed85e80cb5e22067494fe3db984b637fab8e Mon Sep 17 00:00:00 2001 From: Danh Date: Mon, 2 Oct 2023 15:25:41 +0700 Subject: [PATCH] fix: loop api --- src/state/user/hooks.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state/user/hooks.tsx b/src/state/user/hooks.tsx index 76950e4fff..10308cb4a6 100644 --- a/src/state/user/hooks.tsx +++ b/src/state/user/hooks.tsx @@ -498,7 +498,7 @@ const participantDefault = { export const useGetParticipantKyberAIInfo = (): ParticipantInfo => { const { userInfo } = useSessionInfo() const { data: data = participantDefault, isError } = useGetParticipantInfoQuery(undefined, { - skip: !userInfo, + skip: !userInfo || userInfo?.data?.hasAccessToKyberAI, }) return isError ? participantDefault : data } @@ -511,7 +511,7 @@ export const useIsWhiteListKyberAI = () => { isError, refetch, } = useGetParticipantInfoQuery(undefined, { - skip: !userInfo, + skip: !userInfo || userInfo?.data?.hasAccessToKyberAI, }) const { account } = useActiveWeb3React()