diff --git a/app/src/components/AddCredentialSlider.tsx b/app/src/components/AddCredentialSlider.tsx index 6b6504fc3..d7be2f357 100644 --- a/app/src/components/AddCredentialSlider.tsx +++ b/app/src/components/AddCredentialSlider.tsx @@ -10,7 +10,7 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons' import { hitSlop } from '../constants' import { BCWalletEventTypes } from '../events/eventTypes' -import { showBCIDSelector } from '../helpers/BCIDHelper' +import { showPersonCredentialSelector } from '../helpers/BCIDHelper' export default function AddCredentialSlider() { const { ColorPallet, TextTheme } = useTheme() @@ -91,7 +91,7 @@ export default function AddCredentialSlider() { (c) => c.metadata.data[AnonCredsCredentialMetadataKey].credentialDefinitionId as string ) - setShowGetFoundationCredential(showBCIDSelector(credentialDefinitionIDs, true)) + setShowGetFoundationCredential(showPersonCredentialSelector(credentialDefinitionIDs)) }, [credentials]) useEffect(() => { diff --git a/app/src/helpers/BCIDHelper.ts b/app/src/helpers/BCIDHelper.ts index 296250755..321ac97c2 100644 --- a/app/src/helpers/BCIDHelper.ts +++ b/app/src/helpers/BCIDHelper.ts @@ -41,7 +41,10 @@ export interface WellKnownAgentDetails { invitationId?: string } -export const showPersonCredentialSelector = (credentialDefinitionIDs: string[], canUseLSBCredential: boolean = true): boolean => { +export const showPersonCredentialSelector = ( + credentialDefinitionIDs: string[], + canUseLSBCredential: boolean = true +): boolean => { // If we already have a trusted foundation credential do nothing. if (credentialDefinitionIDs.some((i) => trustedFoundationCredentialIssuerRe.test(i))) { return false @@ -51,8 +54,7 @@ export const showPersonCredentialSelector = (credentialDefinitionIDs: string[], const unlockedByTrustedIssuer = credentialDefinitionIDs.some((i) => trustedInvitationIssuerRe.test(i)) || credentialDefinitionIDs.some((i) => trustedBusinessCardCredentialIssuerRe.test(i)) || - (credentialDefinitionIDs.some((i) => trustedLSBCCredentialIssuerRe.test(i)) && canUseLSBCredential) - + (credentialDefinitionIDs.some((i) => trustedLSBCCredentialIssuerRe.test(i)) && canUseLSBCredential) // We have a trusted credential and can use the LSB credential if (unlockedByTrustedIssuer) { diff --git a/app/src/hooks/notifications.ts b/app/src/hooks/notifications.ts index 9ca2178e7..aed54cf09 100644 --- a/app/src/hooks/notifications.ts +++ b/app/src/hooks/notifications.ts @@ -73,7 +73,6 @@ export const useNotifications = (): Notifications => { (c) => c.metadata.data[AnonCredsCredentialMetadataKey].credentialDefinitionId as string ) const invitationDate = getUnlockCredentialDate(credentials) - console.log('invitationDate', invitationDate) const custom: CustomNotification[] = showPersonCredentialSelector(credentialDefinitionIDs) && invitationDate &&