[Injimob-685] fix download error issue which we are getting when the received vc is tampered (#1268)

* [INJIMOB-685] remove received vc metadata from storage when it is tampered or failed to store vc into storage

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-685] remove redundant store error in request machine

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-685] remove redundant logic to remove the tampered vc metadata

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-685] fix the logic of checking if tampered vc is myvc or received vc

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

* [INJIMOB-685] fix tampering of received vcs

If the received vc is tampered, we should be deleting the vc file & metadata of it. Since the metadata removal was not performed, we were getting download error. This is resolved here.

Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-685] remove unused state and actions in requestMachine

After adding timestamp to the incoming received vc, every vc shared from wallet is condered as separate vc. Due to this reason, the check if the incoming vc is already available in our received vcs will always be returning false. Thus removing the mergingIncomingVcrelated states in requestMachine to avoid unnecessary checks.

Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-685] remove sharing reason related code

Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB_685] remove unused event in vc machine

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>

---------

Signed-off-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com>
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
Co-authored-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
This commit is contained in:
PuBHARGAVI
2024-02-19 15:45:58 +05:30
committed by GitHub
parent 0b4ff67cf9
commit 291243f4d5
17 changed files with 342 additions and 255 deletions

View File

@@ -10,7 +10,6 @@ export interface VC {
requestId?: string;
isVerified?: boolean;
lastVerifiedOn: number;
reason?: VCSharingReason[];
shouldVerifyPresence?: boolean;
walletBindingResponse?: WalletBindingResponse;
credentialRegistry?: string;
@@ -18,11 +17,6 @@ export interface VC {
hashedId?: string;
}
export interface VCSharingReason {
timestamp: number;
message: string;
}
export type VcIdType = 'UIN' | 'VID';
export interface DecodedCredential {

View File

@@ -12,18 +12,12 @@ export interface VC {
isVerified: boolean;
lastVerifiedOn: number;
locked: boolean;
reason?: VCSharingReason[];
shouldVerifyPresence?: boolean;
walletBindingResponse?: WalletBindingResponse;
credentialRegistry?: string;
isPinned?: boolean;
}
export interface VCSharingReason {
timestamp: number;
message: string;
}
export type VcIdType = 'UIN' | 'VID';
export interface DecodedCredential {