[INJIMOB-3205] fix fallback vc rendering if wellknown not available (#2050)

* [INJIMOB-3205] fix fallback vc rendering if wellknown not available

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-3205] update fallback vc card view bg image

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

---------

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
This commit is contained in:
abhip2565
2025-08-13 08:04:04 +05:30
committed by GitHub
parent 40c1446b97
commit b0168c31df
7 changed files with 11 additions and 12 deletions

View File

@@ -82,6 +82,7 @@ export const VCCardView: React.FC<VCItemProps> = ({
setFields(response.fields);
})
.catch(error => {
setWellknown({"fallback":"true"});
console.error(
'Error occurred while fetching wellknown for viewing VC ',
error,
@@ -97,19 +98,15 @@ export const VCCardView: React.FC<VCItemProps> = ({
const CardViewContent = () => (
<VCCardViewContent
vcMetadata={vcMetadata}
context={controller.context}
walletBindingResponse={controller.walletBindingResponse}
credential={vc}
verifiableCredentialData={verifiableCredentialData}
fields={fields}
wellknown={wellknown}
generatedOn={formattedDate}
selectable={selectable}
selected={selected}
service={service}
isPinned={isPinned}
onPress={() => onPress(service)}
isDownloading={isDownloading}
flow={flow}
isKebabPopUp={controller.isKebabPopUp}
DISMISS={controller.DISMISS}

View File

@@ -21,7 +21,7 @@ import {useTranslation} from 'react-i18next';
import testIDProps from '../../../shared/commonUtil';
export const VCCardViewContent: React.FC<VCItemContentProps> = ({isPinned = false, context, credential, verifiableCredentialData, fields, wellknown, generatedOn, selectable, selected, service, onPress, isDownloading, flow, walletBindingResponse, KEBAB_POPUP, DISMISS, isKebabPopUp, vcMetadata, isInitialLaunch}) => {
export const VCCardViewContent: React.FC<VCItemContentProps> = ({isPinned = false, credential, verifiableCredentialData, wellknown, selectable, selected, service, onPress, flow, walletBindingResponse, KEBAB_POPUP, DISMISS, isKebabPopUp, vcMetadata, isInitialLaunch}) => {
const wellknownDisplayProperty = new Display(wellknown);
const vcSelectableButton =
selectable &&
@@ -92,7 +92,7 @@ export const VCCardViewContent: React.FC<VCItemContentProps> = ({isPinned = fals
</Row>
</Column>
{isVCLoaded(credential, fields) && (
{isVCLoaded(credential) && (
<Image
{...testIDProps('issuerLogo')}
src={issuerLogo?.url}