mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
Merge pull request #108 from tw-mosip/inji-262-pin-VC-audit-log
fix(INJI-262):pinned VC's audit logs are missing
This commit is contained in:
@@ -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 { isSameVC } 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 == props.vcKey) {
|
||||
const vcKeyMatch = isSameVC(activity._vcKey, props.vcKey);
|
||||
if (vcKeyMatch) {
|
||||
return (
|
||||
<ActivityLogText
|
||||
key={`${activity.timestamp}-${activity._vcKey}`}
|
||||
|
||||
@@ -22,6 +22,13 @@ 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 isSameVC = (vcKey: string, pinnedVcKey: string) => {
|
||||
const requestId = vcKey.split(':')[3];
|
||||
const pinnedRequestId = pinnedVcKey.split(':')[3];
|
||||
return requestId === pinnedRequestId;
|
||||
};
|
||||
|
||||
export let individualId = '';
|
||||
|
||||
export const GET_INDIVIDUAL_ID = (ind_Id: string) => {
|
||||
|
||||
Reference in New Issue
Block a user