From 28c5d86ce13a8dbe62c3a722d662858554c32aaf Mon Sep 17 00:00:00 2001 From: Tilak Puli Date: Tue, 14 Mar 2023 15:36:04 +0530 Subject: [PATCH] feat(#625):[Tilak/Adityan] Refactor names in store error flow --- locales/en.json | 1 + machines/openIdBle/request.ts | 2 +- screens/Request/ReceiveVcScreen.strings.json | 1 + screens/Request/ReceiveVcScreen.tsx | 2 +- screens/Request/ReceiveVcScreenController.ts | 7 +++++-- shared/hooks/useOverlayVisibleAfterTimeout.ts | 4 ++-- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/locales/en.json b/locales/en.json index 9345839b8e..dc9fe0f142 100644 --- a/locales/en.json +++ b/locales/en.json @@ -244,6 +244,7 @@ "header": "{{vcLabel}} details", "save": "Save {{vcLabel}}", "verifyAndSave": "Verify and save", + "reject": "Reject", "discard": "Discard", "goToReceivedVCTab": "View Received {{vcLabel}}", "errors": { diff --git a/machines/openIdBle/request.ts b/machines/openIdBle/request.ts index 0e8b3ada1b..e17ed9873a 100644 --- a/machines/openIdBle/request.ts +++ b/machines/openIdBle/request.ts @@ -904,7 +904,7 @@ export function selectIsAccepting(state: State) { return state.matches('reviewing.accepting'); } -export function selectIsSavingFailedIdle(state: State) { +export function selectIsSavingFailedInIdle(state: State) { return state.matches('reviewing.savingFailed.idle'); } diff --git a/screens/Request/ReceiveVcScreen.strings.json b/screens/Request/ReceiveVcScreen.strings.json index e7d7573244..6bf421dae5 100644 --- a/screens/Request/ReceiveVcScreen.strings.json +++ b/screens/Request/ReceiveVcScreen.strings.json @@ -2,6 +2,7 @@ "header": "{{vcLabel}} details", "save": "Save {{vcLabel}}", "verifyAndSave": "Verify and save", + "reject": "Reject", "discard": "Discard", "goToReceivedVCTab": "View Received {{vcLabel}}", "errors": { diff --git a/screens/Request/ReceiveVcScreen.tsx b/screens/Request/ReceiveVcScreen.tsx index 3a0fe26591..f86361049a 100644 --- a/screens/Request/ReceiveVcScreen.tsx +++ b/screens/Request/ReceiveVcScreen.tsx @@ -116,7 +116,7 @@ export const ReceiveVcScreen: React.FC = () => { /> { if (visibleStart) { - const timeout = setTimeout(() => { + const timeoutID = setTimeout(() => { setVisible(true); }, ms); - setSavingTimeout(timeout); + setSavingTimeout(timeoutID); } else { clearTimeout(savingTimeout); setVisible(false);