From 1c9b62361efff2f3bc84a4bc4f6858594727609d Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Fri, 24 Sep 2021 17:43:04 +0300 Subject: [PATCH] ADD: show message if no wallets has been found during the import --- loc/en.json | 1 + screen/wallets/importDiscovery.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/loc/en.json b/loc/en.json index 991fc5422..c8e344781 100644 --- a/loc/en.json +++ b/loc/en.json @@ -481,6 +481,7 @@ "import_discovery_title": "Discovery", "import_discovery_subtitle": "Choose a wallet from discovered", "import_discovery_derivation": "Use custom derivation path", + "import_discovery_no_wallets": "No wallets has been found.", "import_derivation_found": "found", "import_derivation_found_not": "not found", "import_derivation_loading": "loading...", diff --git a/screen/wallets/importDiscovery.js b/screen/wallets/importDiscovery.js index 8daf6018a..b3d313120 100644 --- a/screen/wallets/importDiscovery.js +++ b/screen/wallets/importDiscovery.js @@ -119,7 +119,13 @@ const ImportWalletDiscovery = () => { {loc.wallets.import_discovery_subtitle} - w.id} renderItem={renderItem} /> + {!loading && wallets.length === 0 ? ( + + {loc.wallets.import_discovery_no_wallets} + + ) : ( + w.id} renderItem={renderItem} /> + )} {loading && ( @@ -163,6 +169,11 @@ const styles = StyleSheet.create({ buttonContainer: { height: 45, }, + noWallets: { + flexGrow: 1, + alignItems: 'center', + justifyContent: 'center', + }, }); ImportWalletDiscovery.navigationOptions = navigationStyle({}, opts => ({ ...opts, title: loc.wallets.import_discovery_title }));