Skip to content

Commit d6166ea

Browse files
authored
fix(onboarding): adjust rocket loading duration (#1905)
1 parent a8bb9ec commit d6166ea

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/screens/Onboarding/Loading.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ const rocketSize = 256;
3232
Animated.addWhitelistedNativeProps({ text: true });
3333
const AnimatedText = Animated.createAnimatedComponent(TextInput);
3434

35-
const LoadingWalletScreen = (): ReactElement => {
35+
const LoadingWalletScreen = ({
36+
isRestoring = false,
37+
}: {
38+
isRestoring?: boolean;
39+
}): ReactElement => {
3640
const { t } = useTranslation('onboarding');
3741
const { width } = useWindowDimensions();
42+
const animationDuration = isRestoring ? 16000 : 1500;
3843

3944
const progressValue = useSharedValue(0);
4045
const progressText = useDerivedValue(() => {
@@ -46,7 +51,7 @@ const LoadingWalletScreen = (): ReactElement => {
4651

4752
useEffect(() => {
4853
progressValue.value = withTiming(100, {
49-
duration: 4000,
54+
duration: animationDuration,
5055
easing: Easing.linear,
5156
});
5257
// eslint-disable-next-line react-hooks/exhaustive-deps

src/screens/Onboarding/Restoring.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const RestoringScreen = (): ReactElement => {
8484
}, [profile.name, onboardingStep, dispatch]);
8585

8686
let color: keyof IColors = 'brand';
87-
let content = <LoadingWalletScreen />;
87+
let content = <LoadingWalletScreen isRestoring={true} />;
8888

8989
if (showRestored || showFailed) {
9090
color = showRestored ? 'green' : 'red';

0 commit comments

Comments
 (0)