File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
hooks/verification/useVerifiedRecords Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import { Hash } from 'viem'
77import { setRecords } from '@ensdomains/ensjs/wallet'
88
99import {
10- DENTITY_ISS ,
1110 DENTITY_BASE_ENDPOINT ,
11+ DENTITY_ISS ,
1212 VERIFICATION_OAUTH_BASE_URL ,
1313 VERIFICATION_RECORD_KEY ,
1414} from '@app/constants/verification'
Original file line number Diff line number Diff line change 11import { match } from 'ts-pattern'
22
3- import type { VerificationProtocol } from '@app/transaction-flow/input/VerifyProfile/VerifyProfile-flow'
43import { getNetworkFromUrl } from '@app/constants/chains'
4+ import type { VerificationProtocol } from '@app/transaction-flow/input/VerifyProfile/VerifyProfile-flow'
55
66/**
77 * General Verification Constants
@@ -55,9 +55,9 @@ const DENTITY_ENV_CONFIGS = {
5555type DentityEnvironment = keyof typeof DENTITY_ENV_CONFIGS
5656
5757const DENTITY_ENV : DentityEnvironment = match ( getNetworkFromUrl ( ) )
58- . with ( 'mainnet' , ( ) => 'production' as const )
59- . with ( 'sepolia' , ( ) => 'staging' as const )
60- . otherwise ( ( ) => 'dev' as const )
58+ . with ( 'mainnet' , ( ) => 'production' as const )
59+ . with ( 'sepolia' , ( ) => 'staging' as const )
60+ . otherwise ( ( ) => 'dev' as const )
6161
6262export const DENTITY_BASE_ENDPOINT = DENTITY_ENV_CONFIGS [ DENTITY_ENV ] . endpoint
6363
Original file line number Diff line number Diff line change 11import { QueryFunctionContext } from '@tanstack/react-query'
22import { Hash } from 'viem'
33
4+ import { DENTITY_BASE_ENDPOINT } from '@app/constants/verification'
45import { useQueryOptions } from '@app/hooks/useQueryOptions'
56import { CreateQueryKey , QueryConfig } from '@app/types'
67import { getIsCachedData } from '@app/utils/getIsCachedData'
@@ -12,7 +13,6 @@ import {
1213 parseVerificationData ,
1314 VerifiedRecord ,
1415} from './utils/parseVerificationData/parseVerificationData'
15- import { DENTITY_BASE_ENDPOINT } from '@app/constants/verification'
1616
1717type UseVerifiedRecordsParameters = {
1818 verificationsRecord ?: string
@@ -50,7 +50,9 @@ export const getVerifiedRecords = async <TParams extends UseVerifiedRecordsParam
5050 const verifiablePresentationUris = parseVerificationRecord ( verificationsRecord )
5151
5252 // Filter to only allow Dentity verification URLs
53- const validUris = verifiablePresentationUris . filter ( ( uri ) => uri . startsWith ( DENTITY_BASE_ENDPOINT ) )
53+ const validUris = verifiablePresentationUris . filter ( ( uri ) =>
54+ uri . startsWith ( DENTITY_BASE_ENDPOINT ) ,
55+ )
5456
5557 const responses = await Promise . allSettled (
5658 validUris . map ( ( uri ) => fetch ( uri ) . then ( ( resp ) => resp . json ( ) ) ) ,
You can’t perform that action at this time.
0 commit comments