Skip to content

Commit 4fc7f19

Browse files
committed
fix(suite-native): welcome flow device disconnected alert
1 parent b82c1b3 commit 4fc7f19

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

suite-native/module-onboarding/src/screens/BiometricsScreen.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export const BiometricsScreen = ({
4646
};
4747

4848
const exitOnboardingFlow = () => {
49-
dispatch(setIsOnboardingFinished());
50-
5149
navigation.dispatch(
5250
CommonActions.reset({
5351
index: 0,
@@ -61,6 +59,14 @@ export const BiometricsScreen = ({
6159
],
6260
}),
6361
);
62+
63+
// FIXME: Hotfix temporary solution.
64+
// Timeout is needed to ensure that navigation event already finishes before changing the redux state.
65+
// Situation when the onboarding screen was still focused but the state was already changed made `useHandleDeviceConnection`
66+
// to display the device disconnected alert even if it should not be displayed.
67+
setTimeout(() => {
68+
dispatch(setIsOnboardingFinished());
69+
}, 500);
6470
};
6571

6672
const handleEnableButtonPress = async () => {

0 commit comments

Comments
 (0)