diff --git a/loc/en.json b/loc/en.json index 75c39f1db..f339087ed 100644 --- a/loc/en.json +++ b/loc/en.json @@ -484,7 +484,8 @@ "list_tryagain": "Try again", "no_ln_wallet_error": "Before paying a Lightning invoice, you must first add a Lightning wallet.", "looks_like_bip38": "This looks like a password-protected private key (BIP38).", - "reorder_title": "Re-order Wallets", + "manage_title": "Manage Wallets", + "no_results_found": "No results found.", "please_continue_scanning": "Please continue scanning.", "select_no_bitcoin": "There are currently no Bitcoin wallets available.", "select_no_bitcoin_exp": "A Bitcoin wallet is required to refill Lightning wallets. Please create or import one.", @@ -495,7 +496,7 @@ "add_ln_wallet_first": "You must first add a Lightning wallet.", "identity_pubkey": "Identity Pubkey", "xpub_title": "Wallet XPUB", - "search_wallets": "Search wallets, memos, and transactions", + "search_wallets": "Search wallets, memos, and transactions" }, "multisig": { "multisig_vault": "Vault", diff --git a/navigation/DetailViewScreensStack.tsx b/navigation/DetailViewScreensStack.tsx index d9a3a818f..131a65f72 100644 --- a/navigation/DetailViewScreensStack.tsx +++ b/navigation/DetailViewScreensStack.tsx @@ -55,7 +55,6 @@ import PaymentCodesListComponent from './LazyLoadPaymentCodeStack'; import LDKOpenChannelRoot from './LDKOpenChannelStack'; import LNDCreateInvoiceRoot from './LNDCreateInvoiceStack'; import ReceiveDetailsStackRoot from './ReceiveDetailsStack'; -import ReorderWalletsStackRoot from './ReorderWalletsStack'; import ScanLndInvoiceRoot from './ScanLndInvoiceStack'; import ScanQRCodeStackRoot from './ScanQRCodeStack'; import SendDetailsStack from './SendDetailsStack'; @@ -66,6 +65,7 @@ import WalletXpubStackRoot from './WalletXpubStack'; import PlusIcon from '../components/icons/PlusIcon'; import SettingsButton from '../components/icons/SettingsButton'; import ExportMultisigCoordinationSetupStack from './ExportMultisigCoordinationSetupStack'; +import ManageWalletsStackRoot from './ManageWalletsStack'; const DetailViewStackScreensStack = () => { const theme = useTheme(); @@ -379,8 +379,8 @@ const DetailViewStackScreensStack = () => { }} /> { +const ManageWalletsStackRoot = () => { const theme = useTheme(); return ( ); }; -export default ReorderWalletsStackRoot; +export default ManageWalletsStackRoot; diff --git a/navigation/SendDetailsStackParamList.ts b/navigation/SendDetailsStackParamList.ts index 7a8f1bbb6..038ad79e3 100644 --- a/navigation/SendDetailsStackParamList.ts +++ b/navigation/SendDetailsStackParamList.ts @@ -213,5 +213,5 @@ export type DetailViewStackParamList = { paymentCode: string; walletID: string; }; - ReorderWallets: undefined; + ManageWallets: undefined; }; diff --git a/screen/wallets/DrawerList.tsx b/screen/wallets/DrawerList.tsx index f34b0210e..31515ebd1 100644 --- a/screen/wallets/DrawerList.tsx +++ b/screen/wallets/DrawerList.tsx @@ -124,7 +124,7 @@ const DrawerList: React.FC = memo(({ navigation }) => { const handleLongPress = useCallback(() => { if (state.wallets.length > 1) { - navigation.navigate('ReorderWallets'); + navigation.navigate('ManageWalletsRoot'); } else { triggerHapticFeedback(HapticFeedbackTypes.NotificationError); } diff --git a/screen/wallets/ReorderWallets.tsx b/screen/wallets/ManageWallets.tsx similarity index 94% rename from screen/wallets/ReorderWallets.tsx rename to screen/wallets/ManageWallets.tsx index a709c07c7..c0d276f3a 100644 --- a/screen/wallets/ReorderWallets.tsx +++ b/screen/wallets/ManageWallets.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useLayoutEffect, useRef, useReducer, useCallback, useMemo } from 'react'; import { Platform, StyleSheet, useColorScheme, TouchableOpacity, Image, Animated, Text, I18nManager } from 'react-native'; -// @ts-ignore: fix later +// @ts-ignore: no declaration file import DraggableFlatList, { ScaleDecorator } from 'react-native-draggable-flatlist'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback'; @@ -101,7 +101,7 @@ const useBounceAnimation = (query: string) => { return bounceAnim; }; -const ReorderWallets: React.FC = () => { +const ManageWallets: React.FC = () => { const sortableList = useRef(null); const { colors, closeImage } = useTheme(); const { wallets, setWalletsWithNewOrder, txMetadata } = useStorage(); @@ -116,6 +116,9 @@ const ReorderWallets: React.FC = () => { tip: { backgroundColor: colors.ballOutgoingExpired, }, + noResultsText: { + color: colors.foregroundColor, + }, }; useEffect(() => { @@ -284,12 +287,14 @@ const ReorderWallets: React.FC = () => { return ( <> - {hasWallets &&
} - {hasTransactions &&
} - {!hasWallets && !hasTransactions && No results found} + {hasWallets &&
} + {hasTransactions &&
} + {!hasWallets && !hasTransactions && ( + {loc.wallets.no_results_found} + )} ); - }, [state.searchQuery, state.walletData, state.txMetadata]); + }, [state.searchQuery, state.walletData.length, state.txMetadata, stylesHook.noResultsText]); return ( @@ -311,7 +316,7 @@ const ReorderWallets: React.FC = () => { ); }; -export default ReorderWallets; +export default ManageWallets; const styles = StyleSheet.create({ root: { diff --git a/screen/wallets/WalletsList.tsx b/screen/wallets/WalletsList.tsx index db3143cac..5bda72255 100644 --- a/screen/wallets/WalletsList.tsx +++ b/screen/wallets/WalletsList.tsx @@ -229,7 +229,7 @@ const WalletsList: React.FC = () => { const handleLongPress = useCallback(() => { if (wallets.length > 1) { - navigate('ReorderWallets'); + navigate('ManageWalletsRoot'); } else { triggerHapticFeedback(HapticFeedbackTypes.NotificationError); }