Commit a2cdd4f0 authored by tom's avatar tom

use profile query for verified addresses page

parent 03b64ae5
......@@ -7,6 +7,7 @@ import type { VerifiedAddress, TokenInfoApplication, TokenInfoApplications, Veri
import appConfig from 'configs/app/config';
import useApiQuery, { getResourceKey } from 'lib/api/useApiQuery';
import useFetchProfileInfo from 'lib/hooks/useFetchProfileInfo';
import useRedirectForInvalidAuthToken from 'lib/hooks/useRedirectForInvalidAuthToken';
import getQueryParamString from 'lib/router/getQueryParamString';
import { TOKEN_INFO_APPLICATION, VERIFIED_ADDRESS } from 'stubs/account';
......@@ -54,6 +55,7 @@ const VerifiedAddresses = () => {
},
},
});
const profileQuery = useFetchProfileInfo();
const isLoading = addressesQuery.isPlaceholderData || applicationsQuery.isPlaceholderData;
......@@ -99,8 +101,8 @@ const VerifiedAddresses = () => {
});
}, [ queryClient ]);
if (addressesQuery.isError && addressesQuery.error.status === 403) {
throw new Error('Unverified email error', { cause: addressesQuery.error });
if (profileQuery.isError && profileQuery.error.status === 403) {
throw new Error('Unverified email error', { cause: profileQuery.error });
}
const addButton = (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment