mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
fix(INJI-262):pinned VC's audit logs are missing
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
Reference in New Issue
Block a user