[INJIMOB-3374]: reset error messages on retry vp sharing (#1986)

Signed-off-by: Alka <prasadalka1998@gmail.com>
This commit is contained in:
Alka Prasad
2025-07-03 19:16:31 +05:30
committed by GitHub
parent ccdd236920
commit c6af57cc3e
2 changed files with 11 additions and 2 deletions

View File

@@ -394,11 +394,11 @@ export const openID4VPMachine = model.createMachine(
showError: {
on: {
RETRY: {
actions: ['incrementOpenID4VPRetryCount'],
actions: ['resetError', 'incrementOpenID4VPRetryCount'],
target: 'sendingVP',
},
RESET_RETRY_COUNT: {
actions: 'resetOpenID4VPRetryCount',
actions: ['resetError', 'resetOpenID4VPRetryCount'],
},
RESET_ERROR: {
actions: 'resetError',

View File

@@ -320,6 +320,15 @@ export function useSendVPScreen() {
});
generateAndStoreLogMessage('TECHNICAL_ERROR');
hasLoggedErrorRef.current = true;
} else if (error === '') {
setErrorModalData({
show: false,
title: '',
message: '',
additionalMessage: '',
showRetryButton: false,
});
hasLoggedErrorRef.current = false;
}
}, [error, noCredentialsMatchingVPRequest]);