From 272e1f72f8480117f387cd41089a3814ee0e9a15 Mon Sep 17 00:00:00 2001 From: al-rosenthal Date: Wed, 11 Dec 2024 10:58:05 -0800 Subject: [PATCH 1/2] fix: fixed logic for credential proof headers Signed-off-by: al-rosenthal --- packages/legacy/core/App/screens/ProofRequest.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/legacy/core/App/screens/ProofRequest.tsx b/packages/legacy/core/App/screens/ProofRequest.tsx index 899774316..820144f9e 100644 --- a/packages/legacy/core/App/screens/ProofRequest.tsx +++ b/packages/legacy/core/App/screens/ProofRequest.tsx @@ -834,7 +834,7 @@ const ProofRequest: React.FC = ({ navigation, proofId }) => { {!hasAvailableCredentials && ( 1 && userCredentials.length > 1 + missingCredentials.length > 0 && userCredentials.length > 0 ? credentialListHeader(t('ProofRequest.MissingCredentials')) : undefined } @@ -856,7 +856,7 @@ const ProofRequest: React.FC = ({ navigation, proofId }) => { )} 1 && userCredentials.length > 1 + missingCredentials.length > 0 && userCredentials.length > 0 ? credentialListHeader(t('ProofRequest.FromYourWallet')) : undefined } From b4d32628830cb34bd454be1e850763955b49fd6e Mon Sep 17 00:00:00 2001 From: al-rosenthal Date: Wed, 11 Dec 2024 11:27:07 -0800 Subject: [PATCH 2/2] test: updated test template Signed-off-by: al-rosenthal --- .../W3cProofRequest.test.tsx.snap | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/packages/legacy/core/__tests__/screens/__snapshots__/W3cProofRequest.test.tsx.snap b/packages/legacy/core/__tests__/screens/__snapshots__/W3cProofRequest.test.tsx.snap index 7b94c5b4b..289cfef1c 100644 --- a/packages/legacy/core/__tests__/screens/__snapshots__/W3cProofRequest.test.tsx.snap +++ b/packages/legacy/core/__tests__/screens/__snapshots__/W3cProofRequest.test.tsx.snap @@ -163,6 +163,29 @@ exports[`displays a proof request screen ProofRequest Screen, W3C displays a pro } /> } + ListHeaderComponent={ + + + ProofRequest.MissingCredentials + + + } data={ Array [ Object { @@ -213,6 +236,32 @@ exports[`displays a proof request screen ProofRequest Screen, W3C displays a pro viewabilityConfigCallbackPairs={Array []} > + + + + ProofRequest.MissingCredentials + + + + + ProofRequest.FromYourWallet + + + } data={ Array [ Object { @@ -699,6 +771,32 @@ exports[`displays a proof request screen ProofRequest Screen, W3C displays a pro viewabilityConfigCallbackPairs={Array []} > + + + + ProofRequest.FromYourWallet + + +