mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
FIX: Mac crash
This commit is contained in:
parent
5605353857
commit
b183f891ec
@ -43,7 +43,7 @@ const MenuElements = () => {
|
||||
|
||||
const reloadTransactionsMenuElementsFunction = useCallback(() => {
|
||||
reloadTransactionsMenuActionFunction();
|
||||
}, [reloadTransactionsMenuActionFunction]);
|
||||
},[reloadTransactionsMenuActionFunction]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log('MenuElements: useEffect');
|
||||
@ -59,14 +59,8 @@ const MenuElements = () => {
|
||||
eventEmitter?.removeAllListeners('importWalletMenuAction');
|
||||
eventEmitter?.removeAllListeners('reloadTransactionsMenuAction');
|
||||
};
|
||||
}, [
|
||||
addWalletMenuAction,
|
||||
importWalletMenuAction,
|
||||
openSettings,
|
||||
reloadTransactionsMenuActionFunction,
|
||||
reloadTransactionsMenuElementsFunction,
|
||||
walletsInitialized,
|
||||
]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [addWalletMenuAction, importWalletMenuAction, openSettings, reloadTransactionsMenuActionFunction, walletsInitialized]);
|
||||
|
||||
return <></>;
|
||||
};
|
||||
|
@ -180,14 +180,14 @@
|
||||
// Implement the functionality for adding a wallet
|
||||
[EventEmitter.sharedInstance importWalletMenuAction];
|
||||
|
||||
NSLog(@"Add Wallet action performed");
|
||||
NSLog(@"Import Wallet action performed");
|
||||
}
|
||||
|
||||
- (void)reloadTransactionsAction:(UIKeyCommand *)keyCommand {
|
||||
// Implement the functionality for adding a wallet
|
||||
[EventEmitter.sharedInstance reloadTransactionsMenuAction];
|
||||
|
||||
NSLog(@"Add Wallet action performed");
|
||||
NSLog(@"Reload Transactions action performed");
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
useWindowDimensions,
|
||||
findNodeHandle,
|
||||
I18nManager,
|
||||
InteractionManager,
|
||||
} from 'react-native';
|
||||
import { BlueHeaderDefaultMain } from '../../BlueComponents';
|
||||
import WalletsCarousel from '../../components/WalletsCarousel';
|
||||
@ -74,7 +75,9 @@ const WalletsList = () => {
|
||||
useCallback(() => {
|
||||
verifyBalance();
|
||||
setSelectedWalletID(undefined);
|
||||
setReloadTransactionsMenuActionFunction(onRefresh);
|
||||
InteractionManager.runAfterInteractions(() => {
|
||||
setReloadTransactionsMenuActionFunction(() => onRefresh);
|
||||
});
|
||||
return () => {
|
||||
setReloadTransactionsMenuActionFunction(() => {});
|
||||
};
|
||||
|
@ -511,7 +511,9 @@ const WalletTransactions = ({ navigation }) => {
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
setReloadTransactionsMenuActionFunction(refreshTransactions);
|
||||
InteractionManager.runAfterInteractions(() => {
|
||||
setReloadTransactionsMenuActionFunction(() => refreshTransactions);
|
||||
});
|
||||
return () => {
|
||||
setReloadTransactionsMenuActionFunction(undefined);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user