diff --git a/src/pages/Fox/components/FoxWifHatClaim/FoxWifHatClaimConfirm.tsx b/src/pages/Fox/components/FoxWifHatClaim/FoxWifHatClaimConfirm.tsx index 05c28e162f6..06e1713230c 100644 --- a/src/pages/Fox/components/FoxWifHatClaim/FoxWifHatClaimConfirm.tsx +++ b/src/pages/Fox/components/FoxWifHatClaim/FoxWifHatClaimConfirm.tsx @@ -66,8 +66,10 @@ export const FoxWifHatClaimConfirm: FC = ({ const foxWifHatAsset = useAppSelector(state => selectAssetById(state, foxWifHatAssetId)) const getFoxWifHatClaimsQuery = useGetFoxWifHatClaims() + console.log({ getFoxWifHatClaimsQuery }) + const claimQuote = useMemo(() => { - const claim = getFoxWifHatClaimsQuery.data?.claims[accountId] + const claim = getFoxWifHatClaimsQuery.data?.claims[fromAccountId(accountId).account] if (!claim) return null return claim diff --git a/src/pages/Fox/components/FoxWifHatClaim/FoxWifHatClaimStatus.tsx b/src/pages/Fox/components/FoxWifHatClaim/FoxWifHatClaimStatus.tsx index 7d07a178e80..fdd1ce4ea7b 100644 --- a/src/pages/Fox/components/FoxWifHatClaim/FoxWifHatClaimStatus.tsx +++ b/src/pages/Fox/components/FoxWifHatClaim/FoxWifHatClaimStatus.tsx @@ -1,5 +1,6 @@ import { CheckCircleIcon, WarningIcon } from '@chakra-ui/icons' import type { AccountId } from '@shapeshiftoss/caip' +import { fromAccountId } from '@shapeshiftoss/caip' import { TxStatus } from '@shapeshiftoss/unchained-client' import type { InterpolationOptions } from 'node-polyglot' import React, { useMemo } from 'react' @@ -40,7 +41,7 @@ export const FoxWifHatClaimStatus: React.FC = ({ const getFoxWifHatClaimsQuery = useGetFoxWifHatClaims() const claimQuote = useMemo(() => { - const claim = getFoxWifHatClaimsQuery.data?.claims[accountId] + const claim = getFoxWifHatClaimsQuery.data?.claims[fromAccountId(accountId).account] if (!claim) return null return claim diff --git a/src/pages/Fox/hooks/useGetFoxWifHatClaims.ts b/src/pages/Fox/hooks/useGetFoxWifHatClaims.ts index 28688cb15b2..fc71860917f 100644 --- a/src/pages/Fox/hooks/useGetFoxWifHatClaims.ts +++ b/src/pages/Fox/hooks/useGetFoxWifHatClaims.ts @@ -7,7 +7,18 @@ export const foxWifHatClaimsQueryKey = ['getFoxWifHatClaims'] export const useGetFoxWifHatClaims = () => { const getFoxWifHatClaims = useCallback(async () => { - return await Promise.resolve(merkleData) + const addressLowercasedClaims = Object.entries(merkleData.claims).reduce( + (acc, [address, claim]) => { + acc[address.toLowerCase()] = claim + return acc + }, + {} as typeof merkleData.claims, + ) + + return await Promise.resolve({ + ...merkleData, + claims: addressLowercasedClaims, + }) }, []) return useQuery({