diff --git a/apps/easypid/src/app/(app)/_layout.tsx b/apps/easypid/src/app/(app)/_layout.tsx index d5084138..6d770153 100644 --- a/apps/easypid/src/app/(app)/_layout.tsx +++ b/apps/easypid/src/app/(app)/_layout.tsx @@ -1,4 +1,4 @@ -import { Redirect, Stack, useGlobalSearchParams, useLocalSearchParams, usePathname, useRouter } from 'expo-router' +import { Redirect, Stack, useGlobalSearchParams, usePathname, useRouter } from 'expo-router' import { TypedArrayEncoder } from '@credo-ts/core' import { useSecureUnlock } from '@easypid/agent' @@ -137,7 +137,7 @@ export default function AppLayout() { - + diff --git a/apps/easypid/src/app/(app)/issuer.tsx b/apps/easypid/src/app/(app)/federation.tsx similarity index 77% rename from apps/easypid/src/app/(app)/issuer.tsx rename to apps/easypid/src/app/(app)/federation.tsx index 0d3916db..662c4b68 100644 --- a/apps/easypid/src/app/(app)/issuer.tsx +++ b/apps/easypid/src/app/(app)/federation.tsx @@ -1,4 +1,4 @@ -import { FunkeIssuerDetailScreen } from '@easypid/features/wallet/FunkeIssuerDetailScreen' +import { FunkeFederationDetailScreen } from '@easypid/features/wallet/FunkeFederationDetailScreen' import { useLocalSearchParams } from 'expo-router' export default function Screen() { @@ -7,7 +7,7 @@ export default function Screen() { const trustedEntityIdsArray = Array.isArray(trustedEntityIds) ? trustedEntityIds : trustedEntityIds?.split(',') ?? [] return ( - ), }, diff --git a/apps/easypid/src/features/receive/slides/VerifyPartySlide.tsx b/apps/easypid/src/features/receive/slides/VerifyPartySlide.tsx index 15b071a9..db93ffc3 100644 --- a/apps/easypid/src/features/receive/slides/VerifyPartySlide.tsx +++ b/apps/easypid/src/features/receive/slides/VerifyPartySlide.tsx @@ -26,7 +26,7 @@ interface VerifyPartySlideProps { backgroundColor?: string lastInteractionDate?: string onContinue?: () => Promise - trustedEntityIds?: string[] + verifiedEntityIds?: Record } export const VerifyPartySlide = ({ @@ -37,13 +37,17 @@ export const VerifyPartySlide = ({ backgroundColor, lastInteractionDate, onContinue, - trustedEntityIds, + verifiedEntityIds, }: VerifyPartySlideProps) => { const router = useRouter() const { onNext, onCancel } = useWizard() const { withHaptics } = useHaptics() const [isLoading, setIsLoading] = useState(false) + const trustedEntityIds = Object.entries(verifiedEntityIds ?? {}) + .filter(([_, isVerified]) => isVerified) + .map(([entityId]) => entityId) + const handleContinue = async () => { setIsLoading(true) if (onContinue) { diff --git a/apps/easypid/src/features/share/FunkeOpenIdPresentationNotificationScreen.tsx b/apps/easypid/src/features/share/FunkeOpenIdPresentationNotificationScreen.tsx index 615a6a33..cb8a79a2 100644 --- a/apps/easypid/src/features/share/FunkeOpenIdPresentationNotificationScreen.tsx +++ b/apps/easypid/src/features/share/FunkeOpenIdPresentationNotificationScreen.tsx @@ -146,7 +146,7 @@ export function FunkeOpenIdPresentationNotificationScreen() { entityId={credentialsForRequest?.verifier.entityId as string} verifierName={credentialsForRequest?.verifier.name} logo={credentialsForRequest?.verifier.logo} - trustedEntityIds={Object.keys(credentialsForRequest?.verifier.verifiedEntityIds ?? [])} + verifiedEntityIds={credentialsForRequest?.verifier.verifiedEntityIds} lastInteractionDate={lastInteractionDate} onComplete={() => pushToWallet('replace')} /> diff --git a/apps/easypid/src/features/share/FunkePresentationNotificationScreen.tsx b/apps/easypid/src/features/share/FunkePresentationNotificationScreen.tsx index 2b360462..f2bd583d 100644 --- a/apps/easypid/src/features/share/FunkePresentationNotificationScreen.tsx +++ b/apps/easypid/src/features/share/FunkePresentationNotificationScreen.tsx @@ -13,7 +13,7 @@ interface FunkePresentationNotificationScreenProps { verifierName?: string logo?: DisplayImage lastInteractionDate?: string - trustedEntityIds?: string[] + verifiedEntityIds?: Record submission?: FormattedSubmission usePin: boolean isAccepting: boolean @@ -33,7 +33,7 @@ export function FunkePresentationNotificationScreen({ isAccepting, submission, onComplete, - trustedEntityIds, + verifiedEntityIds, }: FunkePresentationNotificationScreenProps) { return ( ), }, diff --git a/apps/easypid/src/features/wallet/FunkeIssuerDetailScreen.tsx b/apps/easypid/src/features/wallet/FunkeFederationDetailScreen.tsx similarity index 95% rename from apps/easypid/src/features/wallet/FunkeIssuerDetailScreen.tsx rename to apps/easypid/src/features/wallet/FunkeFederationDetailScreen.tsx index 6381ff97..7b6ba629 100644 --- a/apps/easypid/src/features/wallet/FunkeIssuerDetailScreen.tsx +++ b/apps/easypid/src/features/wallet/FunkeFederationDetailScreen.tsx @@ -17,14 +17,19 @@ import { TextBackButton, useScrollViewPosition } from 'packages/app/src' import { useRef } from 'react' import { useSafeAreaInsets } from 'react-native-safe-area-context' -interface FunkeIssuerDetailScreenProps { +interface FunkeFederationDetailScreenProps { name: string logo?: string entityId?: string trustedEntityIds?: string[] } -export function FunkeIssuerDetailScreen({ name, logo, entityId, trustedEntityIds = [] }: FunkeIssuerDetailScreenProps) { +export function FunkeFederationDetailScreen({ + name, + logo, + entityId, + trustedEntityIds = [], +}: FunkeFederationDetailScreenProps) { const { trustedEntities } = useTrustedEntities() const { handleScroll, isScrolledByOffset, scrollEventThrottle } = useScrollViewPosition()