mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
[INJIMOB-3504] fix detail view rendering cache key issue (#2061)
Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
This commit is contained in:
@@ -74,7 +74,7 @@ export const ViewVcModal: React.FC<ViewVcModalProps> = props => {
|
||||
|
||||
useEffect(() => {
|
||||
getDetailedViewFields(
|
||||
verifiableCredentialData.issuer as string,
|
||||
verifiableCredentialData.vcMetadata.issuerHost as string,
|
||||
verifiableCredentialData.credentialConfigurationId,
|
||||
DETAIL_VIEW_DEFAULT_FIELDS,
|
||||
verifiableCredentialData.vcMetadata.format,
|
||||
|
||||
@@ -42,7 +42,7 @@ export const ReceiveVcScreen: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
getDetailedViewFields(
|
||||
verifiableCredentialData?.issuer,
|
||||
verifiableCredentialData.vcMetadata.issuerHost,
|
||||
verifiableCredentialData.credentialConfigurationId,
|
||||
DETAIL_VIEW_DEFAULT_FIELDS,
|
||||
verifiableCredentialData.vcMetadata.format,
|
||||
|
||||
@@ -177,13 +177,13 @@ export const CACHED_API = {
|
||||
}),
|
||||
|
||||
fetchIssuerWellknownConfig: (
|
||||
issuerId: string,
|
||||
issuerCacheKey: string,
|
||||
credentialIssuer: string,
|
||||
isCachePreferred: boolean = false,
|
||||
) =>
|
||||
generateCacheAPIFunction({
|
||||
isCachePreferred,
|
||||
cacheKey: API_CACHED_STORAGE_KEYS.fetchIssuerWellknownConfig(issuerId),
|
||||
cacheKey: API_CACHED_STORAGE_KEYS.fetchIssuerWellknownConfig(issuerCacheKey),
|
||||
fetchCall: API.fetchIssuerWellknownConfig.bind(null, credentialIssuer),
|
||||
}),
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ export const getDisplayObjectForCurrentLanguage = (
|
||||
};
|
||||
|
||||
export const getCredentialIssuersWellKnownConfig = async (
|
||||
issuer: string | undefined,
|
||||
issuerCacheKey: string | undefined,
|
||||
defaultFields: string[],
|
||||
credentialConfigurationId: string,
|
||||
format: string,
|
||||
@@ -142,7 +142,7 @@ export const getCredentialIssuersWellKnownConfig = async (
|
||||
let wellknownFieldsFlag = false;
|
||||
let matchingWellknownDetails: any;
|
||||
const wellknownResponse = await CACHED_API.fetchIssuerWellknownConfig(
|
||||
issuer!,
|
||||
issuerCacheKey!,
|
||||
issuerHost,
|
||||
true,
|
||||
);
|
||||
@@ -233,14 +233,14 @@ const flattenClaimPaths = (
|
||||
|
||||
|
||||
export const getDetailedViewFields = async (
|
||||
issuer: string,
|
||||
issuerCacheKey: string,
|
||||
credentialConfigurationId: string,
|
||||
defaultFields: string[],
|
||||
format: string,
|
||||
issuerHost: string,
|
||||
) => {
|
||||
let response = await getCredentialIssuersWellKnownConfig(
|
||||
issuer,
|
||||
issuerCacheKey,
|
||||
defaultFields,
|
||||
credentialConfigurationId,
|
||||
format,
|
||||
|
||||
Reference in New Issue
Block a user