mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
[INJIMOB-3440] fix: qr login not showing binded VCs (#2038)
* [INJIMOB-3440] fix: qr login not showing binded VCs Post success of wallet binding, VCItem machine was sending an event to update the VC data stored in VCMetada machine context, which was causing the issue of not able to recognize binded VCs. Other changes: - refactor: rm unused variable Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3440] refactor: rename variable aligning intent Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> --------- Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
This commit is contained in:
committed by
GitHub
parent
21383c3c93
commit
726bcee6c3
@@ -280,7 +280,7 @@ fileignoreconfig:
|
||||
- filename: injitest/src/test/java/androidTestCases/ActivateVcTest.java
|
||||
checksum: ef35bd00dfa77e62018f11fa5ae8864720b1abdfa5da04dc429c046c72bab7c8
|
||||
- filename: machines/VerifiableCredential/VCMetaMachine/VCMetaActions.ts
|
||||
checksum: 5ff9b2a0ad8b7f38b95ad84ec2006b8aecf119c678fadebb18de4ffffd966da8
|
||||
checksum: 3bf2453601a0be8a762570a56aa881f703e55f7b3eb6c61faf99218bb75e6c48
|
||||
- filename: injitest/src/test/java/androidTestCases/DeletingVcTest.java
|
||||
checksum: 8ce5adb75377348b48613c06fa759a63b9f0f9dc20d51218bbe13c4bf1f93d5d
|
||||
- filename: injitest/src/test/java/androidTestCases/GenerateUinOrVidTest.java
|
||||
@@ -373,7 +373,9 @@ fileignoreconfig:
|
||||
- filename: components/FaceScanner/LivenessDetection.tsx
|
||||
checksum: d4140a42ee9ca0f7c90e490f762d181a723fd9dd20db891cbbe53bfbd8f81632
|
||||
- filename: machines/VerifiableCredential/VCItemMachine/VCItemActions.ts
|
||||
checksum: bc11e275227ccf93c5e869b47bb2b63454758983b8fc0e105004fefa1b169091
|
||||
checksum: 511f6f95c0491ad16b03236cd7cc3ef5f4a89d336be1a0202f3f0aaf9e29497d
|
||||
- filename: machines/VerifiableCredential/VCMetaMachine/VCMetaEvents.ts
|
||||
checksum: 9143fde5bb626a35406a104eaa6d110c5e771dbf450cf23fab09271512adf493
|
||||
- filename: machines/app.ts
|
||||
checksum: 5da59bb384d04e29c7745d773108903fa144275c57edc1aca1898fcae7baea84
|
||||
- filename: shared/cryptoutil/signFormatConverter.ts
|
||||
|
||||
@@ -124,7 +124,7 @@ export const VCItemActions = model => {
|
||||
setContext: model.assign((context, event) => {
|
||||
const vcMetadata = VCMetadata.fromVC(context.vcMetadata);
|
||||
if (!vcMetadata.id) {
|
||||
const credId = UUID.generate();
|
||||
const credId = UUID.generate();
|
||||
vcMetadata.id = `${credId}_${vcMetadata.issuer}`;
|
||||
}
|
||||
return {
|
||||
@@ -270,8 +270,17 @@ export const VCItemActions = model => {
|
||||
unSetBindingTransactionId: assign({bindingTransactionId: () => ''}),
|
||||
sendWalletBindingSuccess: send(
|
||||
context => {
|
||||
const {
|
||||
serviceRefs,
|
||||
isMachineInKebabPopupState,
|
||||
verificationStatus,
|
||||
showVerificationStatusBanner,
|
||||
...data
|
||||
} = context;
|
||||
return {
|
||||
type: 'WALLET_BINDING_SUCCESS',
|
||||
vcKey: context.vcMetadata.getVcKey(),
|
||||
vc: data,
|
||||
};
|
||||
},
|
||||
{
|
||||
@@ -449,7 +458,6 @@ export const VCItemActions = model => {
|
||||
}),
|
||||
logDownloaded: send(
|
||||
(context: any) => {
|
||||
const {serviceRefs, ...data} = context;
|
||||
return ActivityLogEvents.LOG_ACTIVITY(
|
||||
VCActivityLog.getLogFromObject({
|
||||
_vcKey: context.vcMetadata.getVcKey(),
|
||||
|
||||
@@ -10,6 +10,7 @@ import {ActivityLogEvents} from '../../activityLog';
|
||||
import {BackupEvents} from '../../backupAndRestore/backup/backupMachine';
|
||||
import {StoreEvents} from '../../store';
|
||||
import {vcVerificationBannerDetails} from '../../../components/BannerNotificationContainer';
|
||||
import {VC} from './vc';
|
||||
|
||||
export const VCMetaActions = (model: any) => {
|
||||
return {
|
||||
@@ -220,7 +221,14 @@ export const VCMetaActions = (model: any) => {
|
||||
}),
|
||||
|
||||
setWalletBindingSuccess: model.assign({
|
||||
walletBindingSuccess: true,
|
||||
walletBindingSuccess: () => true,
|
||||
myVcs: (
|
||||
context: {myVcs: {[vcKey: string]: VC}},
|
||||
event: {vcKey: string; vc: VC},
|
||||
) => {
|
||||
context.myVcs[event.vcKey] = event.vc;
|
||||
return context.myVcs;
|
||||
},
|
||||
}),
|
||||
resetWalletBindingSuccess: model.assign({
|
||||
walletBindingSuccess: false,
|
||||
|
||||
@@ -17,7 +17,7 @@ export const VcMetaEvents = {
|
||||
REFRESH_MY_VCS: () => ({}),
|
||||
REFRESH_MY_VCS_TWO: (vc: VC) => ({vc}),
|
||||
REFRESH_RECEIVED_VCS: () => ({}),
|
||||
WALLET_BINDING_SUCCESS: () => ({}),
|
||||
WALLET_BINDING_SUCCESS: (vcKey: string, vc: VC) => ({vcKey, vc}),
|
||||
RESET_WALLET_BINDING_SUCCESS: () => ({}),
|
||||
ADD_VC_TO_IN_PROGRESS_DOWNLOADS: (requestId: string) => ({requestId}),
|
||||
REMOVE_VC_FROM_IN_PROGRESS_DOWNLOADS: (vcMetadata: VCMetadata) => ({
|
||||
|
||||
Reference in New Issue
Block a user