Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
janrtvld committed Nov 26, 2024
1 parent 9579682 commit f197a17
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
10 changes: 5 additions & 5 deletions apps/easypid/src/features/receive/slides/VerifyPartySlide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface VerifyPartySlideProps {
backgroundColor?: string
lastInteractionDate?: string
onContinue?: () => Promise<void>
verifiedEntities?: Array<TrustedEntity>
trustedEntities?: Array<TrustedEntity>
}

export const VerifyPartySlide = ({
Expand All @@ -37,7 +37,7 @@ export const VerifyPartySlide = ({
backgroundColor,
lastInteractionDate,
onContinue,
verifiedEntities,
trustedEntities,
}: VerifyPartySlideProps) => {
const router = useRouter()
const { onNext, onCancel } = useWizard()
Expand All @@ -55,7 +55,7 @@ export const VerifyPartySlide = ({

const onPressVerifiedIssuer = withHaptics(() => {
router.push(
`/federation?name=${encodeURIComponent(name ?? '')}&logo=${encodeURIComponent(logo?.url ?? '')}&entityId=${encodeURIComponent(entityId)}&trustedEntities=${encodeURIComponent(JSON.stringify(verifiedEntities ?? []))}`
`/federation?name=${encodeURIComponent(name ?? '')}&logo=${encodeURIComponent(logo?.url ?? '')}&entityId=${encodeURIComponent(entityId)}&trustedEntities=${encodeURIComponent(JSON.stringify(trustedEntities ?? []))}`
)
})

Expand Down Expand Up @@ -95,11 +95,11 @@ export const VerifyPartySlide = ({
</YStack>

<YStack gap="$4">
{verifiedEntities && verifiedEntities.length > 0 ? (
{trustedEntities && trustedEntities.length > 0 ? (
<InfoButton
variant="info"
title="Recognized organisation"
description={`Approved by ${verifiedEntities.length} organisations`}
description={`Approved by ${trustedEntities.length} organisations`}
onPress={onPressVerifiedIssuer}
/>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function FunkeOpenIdPresentationNotificationScreen() {
entityId={credentialsForRequest?.verifier.entityId as string}
verifierName={credentialsForRequest?.verifier.name}
logo={credentialsForRequest?.verifier.logo}
verifiedEntities={credentialsForRequest?.verifier.verifiedEntities}
trustedEntities={credentialsForRequest?.verifier.trustedEntities}
lastInteractionDate={lastInteractionDate}
onComplete={() => pushToWallet('replace')}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { DisplayImage, FormattedSubmission } from '@package/agent'
import type { DisplayImage, FormattedSubmission, TrustedEntity } from '@package/agent'

import { type SlideStep, SlideWizard } from '@package/app'
import type { TrustedEntity } from 'packages/agent/src/invitation/handler'
import { LoadingRequestSlide } from '../receive/slides/LoadingRequestSlide'
import { VerifyPartySlide } from '../receive/slides/VerifyPartySlide'
import type { PresentationRequestResult } from './components/utils'
Expand All @@ -14,7 +13,7 @@ interface FunkePresentationNotificationScreenProps {
verifierName?: string
logo?: DisplayImage
lastInteractionDate?: string
verifiedEntities?: Array<TrustedEntity>
trustedEntities?: Array<TrustedEntity>
submission?: FormattedSubmission
usePin: boolean
isAccepting: boolean
Expand All @@ -34,7 +33,7 @@ export function FunkePresentationNotificationScreen({
isAccepting,
submission,
onComplete,
verifiedEntities,
trustedEntities,
}: FunkePresentationNotificationScreenProps) {
return (
<SlideWizard
Expand All @@ -57,7 +56,7 @@ export function FunkePresentationNotificationScreen({
name={verifierName}
logo={logo}
lastInteractionDate={lastInteractionDate}
verifiedEntities={verifiedEntities}
trustedEntities={trustedEntities}
/>
),
},
Expand Down
6 changes: 3 additions & 3 deletions packages/agent/src/invitation/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,14 @@ export const getCredentialsForProofRequest = async ({
resolved.authorizationRequest.authorizationRequestPayload.client_metadata
}

let verifiedEntities: Array<TrustedEntity> = []
let trustedEntities: Array<TrustedEntity> = []
if (entityId) {
const resolvedChains = await agent.modules.openId4VcHolder.resolveOpenIdFederationChains({
entityId: entityId,
trustAnchorEntityIds: TRUSTED_ENTITIES,
})

verifiedEntities = resolvedChains
trustedEntities = resolvedChains
.map((chain) => ({
entity_id: chain.trustAnchorEntityConfiguration.sub,
organization_name:
Expand Down Expand Up @@ -551,7 +551,7 @@ export const getCredentialsForProofRequest = async ({
}
: undefined,
name: clientMetadata?.client_name,
verifiedEntities,
trustedEntities,
},
formattedSubmission,
} as const
Expand Down

0 comments on commit f197a17

Please sign in to comment.