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

This commit is contained in:
Sri Kanth Kola
2023-08-23 17:25:42 +05:30
parent 0574bb658a
commit d040758560
2 changed files with 6 additions and 5 deletions

View File

@@ -8,7 +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';
import { isSameVC } from '../../../shared/constants';
export const HistoryTab: React.FC<HistoryTabProps> = (props) => {
const { t } = useTranslation('HistoryTab');
@@ -31,7 +31,7 @@ export const HistoryTab: React.FC<HistoryTabProps> = (props) => {
onDismiss={controller.DISMISS}>
<Column fill>
{controller.activities.map((activity) => {
const vcKeyMatch = isVcKeyMatch(activity._vcKey, props.vcKey);
const vcKeyMatch = isSameVC(activity._vcKey, props.vcKey);
if (vcKeyMatch) {
return (
<ActivityLogText

View File

@@ -1,4 +1,3 @@
import { Platform } from 'react-native';
import { VC } from '../types/vc';
import {
MIMOTO_HOST,
@@ -23,8 +22,10 @@ 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 const isSameVC = (vcKey: string, pinnedVcKey: string) => {
const requestId = vcKey.split(':')[3];
const pinnedRequestId = pinnedVcKey.split(':')[3];
return requestId === pinnedRequestId;
};
export let individualId = '';