mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
wip
This commit is contained in:
parent
f3e41c146d
commit
a18d29b3aa
2 changed files with 10 additions and 12 deletions
|
@ -372,8 +372,7 @@ const WalletTransactions: React.FC<WalletTransactionsProps> = ({ route }) => {
|
|||
task.cancel();
|
||||
setReloadTransactionsMenuActionFunction(() => {});
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [refreshTransactions]),
|
||||
}, [refreshTransactions, setReloadTransactionsMenuActionFunction]),
|
||||
);
|
||||
|
||||
const refreshProps = isDesktop || isElectrumDisabled ? {} : { refreshing: isLoading, onRefresh: refreshTransactions };
|
||||
|
|
|
@ -148,6 +148,14 @@ const WalletsList: React.FC = () => {
|
|||
// Optimized for Mac option doesn't like RN Refresh component. Menu Elements now handles it for macOS
|
||||
}, [refreshTransactions]);
|
||||
|
||||
const verifyBalance = useCallback(() => {
|
||||
if (getBalance() !== 0) {
|
||||
A(A.ENUM.GOT_NONZERO_BALANCE);
|
||||
} else {
|
||||
A(A.ENUM.GOT_ZERO_BALANCE);
|
||||
}
|
||||
}, [getBalance]);
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
const task = InteractionManager.runAfterInteractions(() => {
|
||||
|
@ -159,8 +167,7 @@ const WalletsList: React.FC = () => {
|
|||
task.cancel();
|
||||
setReloadTransactionsMenuActionFunction(() => {});
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [onRefresh]),
|
||||
}, [onRefresh, setReloadTransactionsMenuActionFunction, verifyBalance, setSelectedWalletID]),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -180,14 +187,6 @@ const WalletsList: React.FC = () => {
|
|||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [route.params?.scannedData]);
|
||||
|
||||
const verifyBalance = useCallback(() => {
|
||||
if (getBalance() !== 0) {
|
||||
A(A.ENUM.GOT_NONZERO_BALANCE);
|
||||
} else {
|
||||
A(A.ENUM.GOT_ZERO_BALANCE);
|
||||
}
|
||||
}, [getBalance]);
|
||||
|
||||
useEffect(() => {
|
||||
refreshTransactions(false, true);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
|
Loading…
Add table
Reference in a new issue