mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
[INJIMOB-3196] ad null checks to fix crash issues (#1887)
Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
This commit is contained in:
@@ -63,10 +63,11 @@ export const VCCardView: React.FC<VCItemProps> = ({
|
||||
}, [isDownloading, controller.credential]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!verifiableCredentialData || !verifiableCredentialData.vcMetadata) return;
|
||||
const {
|
||||
issuer,
|
||||
credentialConfigurationId,
|
||||
vcMetadata: {format},
|
||||
vcMetadata: { format },
|
||||
} = verifiableCredentialData;
|
||||
if (vcMetadata.issuerHost) {
|
||||
getCredentialIssuersWellKnownConfig(
|
||||
@@ -87,12 +88,12 @@ export const VCCardView: React.FC<VCItemProps> = ({
|
||||
);
|
||||
});
|
||||
}
|
||||
}, [verifiableCredentialData?.vcMetadata]);
|
||||
}, [verifiableCredentialData]);
|
||||
|
||||
if (!isVCLoaded(controller.credential, fields)) {
|
||||
if (!isVCLoaded(controller.credential, fields) || !wellknown || !vc) {
|
||||
return <VCCardSkeleton />;
|
||||
}
|
||||
|
||||
|
||||
const CardViewContent = () => (
|
||||
<VCCardViewContent
|
||||
vcMetadata={vcMetadata}
|
||||
|
||||
Reference in New Issue
Block a user