mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-04 20:27:20 +01:00
Update LoadingScreen.js
This commit is contained in:
parent
46746bf8b3
commit
9a367585a9
1 changed files with 3 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect, useState, useRef } from 'react';
|
import React, { useState, useRef } from 'react';
|
||||||
import LottieView from 'lottie-react-native';
|
import LottieView from 'lottie-react-native';
|
||||||
import WalletMigrate from './screen/wallets/walletMigrate';
|
import WalletMigrate from './screen/wallets/walletMigrate';
|
||||||
import * as NavigationService from './NavigationService';
|
import * as NavigationService from './NavigationService';
|
||||||
|
@ -11,7 +11,7 @@ const LoadingScreen = () => {
|
||||||
const handleMigrationComplete = async () => {
|
const handleMigrationComplete = async () => {
|
||||||
setIsMigratinData(false);
|
setIsMigratinData(false);
|
||||||
};
|
};
|
||||||
const walletMigrate = new WalletMigrate(handleMigrationComplete);
|
const walletMigrate = useRef(new WalletMigrate(handleMigrationComplete));
|
||||||
|
|
||||||
const replaceStackNavigation = () => {
|
const replaceStackNavigation = () => {
|
||||||
NavigationService.dispatch(StackActions.replace('UnlockWithScreenRoot'));
|
NavigationService.dispatch(StackActions.replace('UnlockWithScreenRoot'));
|
||||||
|
@ -25,9 +25,7 @@ const LoadingScreen = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
walletMigrate.current.start();
|
||||||
walletMigrate.start();
|
|
||||||
}, [walletMigrate]);
|
|
||||||
return (
|
return (
|
||||||
<LottieView
|
<LottieView
|
||||||
ref={loadingAnimation}
|
ref={loadingAnimation}
|
||||||
|
|
Loading…
Add table
Reference in a new issue