From ba7082fc9815a1f9b7d433dab7c13276140a2c2b Mon Sep 17 00:00:00 2001 From: Vicente Date: Mon, 21 Sep 2020 17:24:38 +0200 Subject: [PATCH] V almonacid/ch6154/misc ui ux improvements part 2 (#977) * remove network in app settings (forgot this in previous PR) * fix crash when switching wallets * change wording: 'Total ADA' by 'Available funds' * fix overflow in copy address button --- src/components/Delegation/StakingDashboard.js | 7 +------ src/components/Delegation/dashboard/UserSummary.js | 2 +- src/components/Settings/ApplicationSettingsScreen.js | 9 --------- src/components/Settings/WalletSettingsScreen.js | 9 +++++++-- .../RestoreWallet/styles/VerifyRestoredWallet.style.js | 1 + 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/components/Delegation/StakingDashboard.js b/src/components/Delegation/StakingDashboard.js index 973f3a0158..766966ccd7 100644 --- a/src/components/Delegation/StakingDashboard.js +++ b/src/components/Delegation/StakingDashboard.js @@ -191,11 +191,6 @@ class StakingDashboard extends React.Component { navigation, } = this.props - const totalBalance = - utxoBalance != null && accountBalance != null - ? utxoBalance.plus(accountBalance) - : null - // TODO: shouldn't be haskell-shelley specific const config = { StartAt: CONFIG.NETWORKS.HASKELL_SHELLEY.START_AT, @@ -289,7 +284,7 @@ class StakingDashboard extends React.Component { /> - {intl.formatMessage(globalMessages.totalAda)}: + {intl.formatMessage(globalMessages.availableFunds)}: {totalAdaSum} diff --git a/src/components/Settings/ApplicationSettingsScreen.js b/src/components/Settings/ApplicationSettingsScreen.js index fa8e802ef6..eb0f549860 100644 --- a/src/components/Settings/ApplicationSettingsScreen.js +++ b/src/components/Settings/ApplicationSettingsScreen.js @@ -93,10 +93,6 @@ const messages = defineMessages({ id: 'components.settings.applicationsettingsscreen.version', defaultMessage: '!!!Current version:', }, - network: { - id: 'components.settings.applicationsettingsscreen.network', - defaultMessage: '!!!Network:', - }, commit: { id: 'components.settings.applicationsettingsscreen.commit', defaultMessage: '!!!Commit:', @@ -233,11 +229,6 @@ const ApplicationSettingsScreen = ({ value={version} /> - - { - const config = getNetworkConfigById(networkId) - return config.MARKETING_NAME + // note(v-almonacid): this throws when switching wallet + try { + const config = getNetworkConfigById(networkId) + return config.MARKETING_NAME + } catch (_e) { + return '-' + } } const _getWalletType = (implId: WalletImplementationId): ?MessageDescriptor => { diff --git a/src/components/WalletInit/RestoreWallet/styles/VerifyRestoredWallet.style.js b/src/components/WalletInit/RestoreWallet/styles/VerifyRestoredWallet.style.js index a9f8d431b6..f202058c0c 100644 --- a/src/components/WalletInit/RestoreWallet/styles/VerifyRestoredWallet.style.js +++ b/src/components/WalletInit/RestoreWallet/styles/VerifyRestoredWallet.style.js @@ -43,6 +43,7 @@ export default StyleSheet.create({ flexDirection: 'row', alignItems: 'center', paddingBottom: 10, + flexWrap: 'wrap', }, copyIcon: { marginLeft: 4,