Skip to content

Commit

Permalink
fix(INJI-441): handle cancel button press during vc share
Browse files Browse the repository at this point in the history
Signed-off-by: Alka <[email protected]>
  • Loading branch information
Alka1703 committed Nov 6, 2023
1 parent 0d973c3 commit cb580a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions machines/bleShare/scan/scanMachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,12 @@ export const scanMachine =
initial: 'inProgress',
states: {
inProgress: {
on: {
CANCEL: {
target: '#scan.reviewing.cancelling',
actions: ['sendVCShareFlowCancelEndEvent'],
},
},
after: {
SHARING_TIMEOUT: {
target: '#scan.reviewing.sendingVc.timeout',
Expand Down
2 changes: 2 additions & 0 deletions screens/Scan/ScanLayoutController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export function useScanLayout() {
statusOverlay = {
title: t('status.inProgress'),
progress: true,
onButtonPress: CANCEL,
};
} else if (isConnectingTimeout) {
statusOverlay = {
Expand Down Expand Up @@ -144,6 +145,7 @@ export function useScanLayout() {
title: t('status.sharing.title'),
hint: t('status.sharing.hint'),
progress: true,
onButtonPress: CANCEL,
};
} else if (isSendingVcTimeout) {
statusOverlay = {
Expand Down

0 comments on commit cb580a3

Please sign in to comment.