diff --git a/eslint.config.mjs b/eslint.config.mjs index c20fb1371c6..6d7b7d8c125 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -236,7 +236,7 @@ export default [ 'src/components/rows/PaymentMethodRow.tsx', 'src/components/rows/SwapProviderRow.tsx', 'src/components/rows/TxCryptoAmountRow.tsx', - 'src/components/scenes/AssetSettingsScene.tsx', + 'src/components/scenes/ChangeMiningFeeScene.tsx', 'src/components/scenes/ConfirmScene.tsx', diff --git a/src/__tests__/scenes/__snapshots__/CurrencySettings.ui.test.tsx.snap b/src/__tests__/scenes/__snapshots__/CurrencySettings.ui.test.tsx.snap index 092a684dff4..2dd5d7b0a28 100644 --- a/src/__tests__/scenes/__snapshots__/CurrencySettings.ui.test.tsx.snap +++ b/src/__tests__/scenes/__snapshots__/CurrencySettings.ui.test.tsx.snap @@ -273,595 +273,725 @@ exports[`CurrencySettings should render 1`] = ` - - Denominations - - - - - ₿ - - - BTG - - - - - - - - -  - - + Denominations + - - - - - m₿ - - - mBTG - - - + /> - - - + + + ₿ + + - BTG + + + + + + + + +  + + + + + - -  - - - - - - - - ƀ - - - bits - - - - + - - - + + + m₿ + + - mBTG + + + + + + + + +  + + + + + - + -  - + + + ƀ + + - bits + + + + + + + + +  + + + + diff --git a/src/components/scenes/AssetSettingsScene.tsx b/src/components/scenes/AssetSettingsScene.tsx index 15a14f4d966..368c6ade956 100644 --- a/src/components/scenes/AssetSettingsScene.tsx +++ b/src/components/scenes/AssetSettingsScene.tsx @@ -6,15 +6,18 @@ import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' import type { EdgeAppSceneProps } from '../../types/routerTypes' +import { EdgeCard } from '../cards/EdgeCard' import { SceneWrapper } from '../common/SceneWrapper' import { CryptoIcon } from '../icons/CryptoIcon' +import { SceneContainer } from '../layout/SceneContainer' import { showToast } from '../services/AirshipInstance' import { cacheStyles, type Theme, useTheme } from '../services/ThemeContext' +import { SettingsRow } from '../settings/SettingsRow' import { SettingsTappableRow } from '../settings/SettingsTappableRow' interface Props extends EdgeAppSceneProps<'assetSettings'> {} -export function AssetSettingsScene(props: Props) { +export function AssetSettingsScene(props: Props): React.ReactElement { const { navigation } = props const theme = useTheme() const styles = getStyles(theme) @@ -52,49 +55,55 @@ export function AssetSettingsScene(props: Props) { return ( - - - - {CURRENCY_SETTINGS_KEYS.map(pluginId => { - if (account.currencyConfig[pluginId] == null) return null - const { currencyInfo } = account.currencyConfig[pluginId] - const { displayName } = currencyInfo - const onPress = () => { - navigation.navigate('currencySettings', { - currencyInfo - }) - } + + + + } + /> + + + {CURRENCY_SETTINGS_KEYS.map(pluginId => { + if (account.currencyConfig[pluginId] == null) return null + const { currencyInfo } = account.currencyConfig[pluginId] + const { displayName } = currencyInfo + const onPress = (): void => { + navigation.navigate('currencySettings', { + currencyInfo + }) + } - return ( - - - - ) - })} + return ( + + + + ) + })} + + ) } const getStyles = cacheStyles((theme: Theme) => ({ - icon: { - marginLeft: theme.rem(0.6) + rightIcon: { + marginHorizontal: theme.rem(0.5) } })) diff --git a/src/components/scenes/CurrencySettingsScene.tsx b/src/components/scenes/CurrencySettingsScene.tsx index ab520c87148..435a561d75f 100644 --- a/src/components/scenes/CurrencySettingsScene.tsx +++ b/src/components/scenes/CurrencySettingsScene.tsx @@ -6,7 +6,9 @@ import { useDisplayDenom } from '../../hooks/useDisplayDenom' import { lstrings } from '../../locales/strings' import { useDispatch, useSelector } from '../../types/reactRedux' import type { EdgeAppSceneProps } from '../../types/routerTypes' +import { EdgeCard } from '../cards/EdgeCard' import { SceneWrapper } from '../common/SceneWrapper' +import { SceneContainer } from '../layout/SceneContainer' import { cacheStyles, type Theme, useTheme } from '../services/ThemeContext' import { SettingsHeaderRow } from '../settings/SettingsHeaderRow' import { SettingsRadioRow } from '../settings/SettingsRadioRow' @@ -42,40 +44,48 @@ export const CurrencySettingsScene: React.FC = props => { return ( - {denominations.length > 1 ? ( - <> - - {denominations.map(denomination => { - const key = denomination.multiplier - const isSelected = key === selectedDenominationMultiplier - const handlePress = async (): Promise => { - await dispatch( - setDenominationKeyRequest(pluginId, currencyCode, denomination) - ) - } + + {denominations.length > 1 ? ( + <> + + + {denominations.map(denomination => { + const key = denomination.multiplier + const isSelected = key === selectedDenominationMultiplier + const handlePress = async (): Promise => { + await dispatch( + setDenominationKeyRequest( + pluginId, + currencyCode, + denomination + ) + ) + } - return ( - - - - {denomination.symbol} - - {' - ' + denomination.name} - - - ) - })} - - ) : null} - - - - - + return ( + + + + {denomination.symbol} + + {' - ' + denomination.name} + + + ) + })} + + + ) : null} + + + + + + ) } diff --git a/src/components/themed/MaybeCustomServersSetting.tsx b/src/components/themed/MaybeCustomServersSetting.tsx index bfac1751312..81930acb891 100644 --- a/src/components/themed/MaybeCustomServersSetting.tsx +++ b/src/components/themed/MaybeCustomServersSetting.tsx @@ -14,6 +14,7 @@ import { sprintf } from 'sprintf-js' import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { logActivity } from '../../util/logger' +import { EdgeCard } from '../cards/EdgeCard' import { EdgeTouchableOpacity } from '../common/EdgeTouchableOpacity' import { type CurrencySettingProps, @@ -102,38 +103,40 @@ const CustomServersSettingComponent: React.FC = props => { return ( <> - - {!enableCustomServers ? null : ( - <> - {Array.from(customServerSet).map(server => ( - { - await handleDeleteNode(server) - }} - > - { - handleEditNode(server) + + + {!enableCustomServers ? null : ( + <> + {Array.from(customServerSet).map(server => ( + { + await handleDeleteNode(server) }} - style={styles.labelContainer} > - {server} - - - ))} - - - )} + { + handleEditNode(server) + }} + style={styles.labelContainer} + > + {server} + + + ))} + + + )} + ) } diff --git a/src/components/themed/MaybeMoneroUserSettings.tsx b/src/components/themed/MaybeMoneroUserSettings.tsx index 7f8448fe66c..e4bcd6c08ce 100644 --- a/src/components/themed/MaybeMoneroUserSettings.tsx +++ b/src/components/themed/MaybeMoneroUserSettings.tsx @@ -4,6 +4,7 @@ import * as React from 'react' import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { logActivity } from '../../util/logger' +import { EdgeCard } from '../cards/EdgeCard' import { type CurrencySettingProps, maybeCurrencySetting @@ -65,16 +66,18 @@ const MoneroUserSettingsComponent: React.FC = props => { <> - - + + + + ) } diff --git a/src/components/themed/MaybePrivateNetworkingSetting.tsx b/src/components/themed/MaybePrivateNetworkingSetting.tsx index 7b7afdb8338..4885aa6e4e0 100644 --- a/src/components/themed/MaybePrivateNetworkingSetting.tsx +++ b/src/components/themed/MaybePrivateNetworkingSetting.tsx @@ -9,6 +9,7 @@ import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' import { logActivity } from '../../util/logger' +import { EdgeCard } from '../cards/EdgeCard' import { type CurrencySettingProps, maybeCurrencySetting @@ -74,16 +75,18 @@ const PrivateNetworkingSettingComponent: React.FC = props => { return ( <> - - + + + + ) } diff --git a/src/locales/en_US.ts b/src/locales/en_US.ts index 177f932ed61..4796d2c2fc8 100644 --- a/src/locales/en_US.ts +++ b/src/locales/en_US.ts @@ -574,7 +574,7 @@ const strings = { settings_monero_lws_info: 'Edge uses Monero Light Wallet Servers (LWS) to scan for transactions. For enhanced privacy, you can run your own Monero LWS.', settings_network_privacy_title: 'Network Privacy', - settings_network_privacy_default: 'Standard (No Privacy)', + settings_network_privacy_default: 'Standard (IP is visible)', settings_network_privacy_nym_mixnet: 'Nym Mixnet', settings_privacy_settings: 'Privacy Settings', settings_nym_mixnet_title: 'Nym Mixnet', diff --git a/src/locales/strings/enUS.json b/src/locales/strings/enUS.json index 3aa27b78106..39af7661f79 100644 --- a/src/locales/strings/enUS.json +++ b/src/locales/strings/enUS.json @@ -421,7 +421,7 @@ "settings_monero_custom": "Custom Light Wallet Server", "settings_monero_lws_info": "Edge uses Monero Light Wallet Servers (LWS) to scan for transactions. For enhanced privacy, you can run your own Monero LWS.", "settings_network_privacy_title": "Network Privacy", - "settings_network_privacy_default": "Standard (No Privacy)", + "settings_network_privacy_default": "Standard (IP is visible)", "settings_network_privacy_nym_mixnet": "Nym Mixnet", "settings_privacy_settings": "Privacy Settings", "settings_nym_mixnet_title": "Nym Mixnet",