Skip to content

Commit

Permalink
fix(INJI-449): secure-keystore warning popup shown on reload of app
Browse files Browse the repository at this point in the history
settings key which was stored in storage was not loaded into settings machine context correctly, which caused the bug - on reload settings related flows was falling back to initial setting.

Co-authored-by: Sreenadh S <[email protected]>

Signed-off-by: Kiruthika Jeyashankar <[email protected]>
  • Loading branch information
KiruthikaJeyashankar committed Nov 28, 2023
1 parent db8238c commit 3a47303
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions machines/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,17 +319,17 @@ export const appMachine = model.createMachine(

loadCredentialRegistryInConstants: (_context, event) => {
changeCrendetialRegistry(
!event.response?.credentialRegistry
!event.response?.encryptedData?.credentialRegistry
? MIMOTO_BASE_URL
: event.response?.credentialRegistry,
: event.response?.encryptedData?.credentialRegistry,
);
},

loadEsignetHostFromConstants: (_context, event) => {
changeEsignetUrl(
!event.response?.esignetHostUrl
!event.response?.encryptedData?.esignetHostUrl
? ESIGNET_BASE_URL
: event.response?.esignetHostUrl,
: event.response?.encryptedData?.esignetHostUrl,
);
},
},
Expand Down
3 changes: 2 additions & 1 deletion machines/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ export const settingsMachine = model.createMachine(
__AppId.setValue(newContext.appId);
return {
...context,
...newContext,
...newContext.encryptedData,
appId: newContext.appId,
};
}),

Expand Down

0 comments on commit 3a47303

Please sign in to comment.