Skip to content

Commit

Permalink
check wallet kyberai
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Jul 17, 2023
1 parent 39607b0 commit b1e1027
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/state/user/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,14 @@ export const useIsWhiteListKyberAI = () => {
const loadingDebounced = useDebounce(isLoading, 500) || connectingWallet

const participantInfo = isError || loadingDebounced || !account ? participantDefault : rawData

// isWhitelist, isWaitList check account is hotfix for now, will remove utils backend fixed bug
return {
loading: loadingDebounced,
isWhiteList:
isLogin && (participantInfo?.status === ParticipantStatus.WHITELISTED || userInfo?.data?.hasAccessToKyberAI),
isWaitList: isLogin && participantInfo?.status === ParticipantStatus.WAITLISTED,
!!account &&
isLogin &&
(participantInfo?.status === ParticipantStatus.WHITELISTED || userInfo?.data?.hasAccessToKyberAI),
isWaitList: !!account && isLogin && participantInfo?.status === ParticipantStatus.WAITLISTED,
refetch,
}
}
Expand Down

0 comments on commit b1e1027

Please sign in to comment.