fix(INJI-262):pinned VC's audit logs are missing

This commit is contained in:
Sri Kanth Kola
2023-08-23 14:45:10 +05:30
parent c2e9be885c
commit 393cd0f56f
2 changed files with 13 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import { ActorRefFrom } from 'xstate';
import { vcItemMachine } from '../../../machines/vcItem';
import { useKebabPopUp } from '../../../components/KebabPopUpController';
import { Theme } from '../../../components/ui/styleUtils';
import { isVcKeyMatch } from '../../../shared/constants';
export const HistoryTab: React.FC<HistoryTabProps> = (props) => {
const { t } = useTranslation('HistoryTab');
@@ -30,7 +31,8 @@ export const HistoryTab: React.FC<HistoryTabProps> = (props) => {
onDismiss={controller.DISMISS}>
<Column fill>
{controller.activities.map((activity) => {
if (activity._vcKey.split(':')[3] == props.vcKey.split(':')[3]) {
const vcKeyMatch = isVcKeyMatch(activity._vcKey, props.vcKey);
if (vcKeyMatch) {
return (
<ActivityLogText
key={`${activity.timestamp}-${activity._vcKey}`}

View File

@@ -1,3 +1,4 @@
import { Platform } from 'react-native';
import { VC } from '../types/vc';
import {
MIMOTO_HOST,
@@ -21,6 +22,11 @@ export const VC_ITEM_STORE_KEY = (vc: Partial<VC>) =>
export const VC_ITEM_STORE_KEY_REGEX =
'^vc:(UIN|VID):[0-9]+:[a-z0-9-]+:[true|false]+$';
//To compare the vckey with requestId, when the vc is pinned
export const isVcKeyMatch = (vckey: string, CompareVckey: string) => {
return vckey.split(':')[3] === CompareVckey.split(':')[3];
};
export let individualId = '';
export const GET_INDIVIDUAL_ID = (ind_Id: string) => {
@@ -47,3 +53,7 @@ export const APP_ID_DICTIONARY = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L',
'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y',
];
export function isIOS(): boolean {
return Platform.OS === 'ios';
}