diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e6d0d95893..e7ff5d52750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - added: Add disableSurveyModal option - changed: Disable Home scene swap and FIO cards if configured - changed: Allow some chains to be disabled in env.json +- changed: "Buy" tab shows "Deposit" for UK users - fixed: FIO OBT data not showing in received transaction memos ## 4.11.0 diff --git a/src/components/themed/MenuTabs.tsx b/src/components/themed/MenuTabs.tsx index 09fc03406fa..fb8056f025c 100644 --- a/src/components/themed/MenuTabs.tsx +++ b/src/components/themed/MenuTabs.tsx @@ -11,9 +11,11 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context' import Ionicon from 'react-native-vector-icons/Ionicons' import SimpleLineIcons from 'react-native-vector-icons/SimpleLineIcons' +import { getCountryCodeByIp } from '../../actions/AccountReferralActions' import { writeDefaultScreen } from '../../actions/DeviceSettingsActions' import { Fontello } from '../../assets/vector/index' import { ENV } from '../../env' +import { useAsyncEffect } from '../../hooks/useAsyncEffect' import { useHandler } from '../../hooks/useHandler' import { LocaleStringKey } from '../../locales/en_US' import { lstrings } from '../../locales/strings' @@ -44,6 +46,7 @@ const title: { readonly [key: string]: string } = { homeTab: lstrings.title_home, walletsTab: lstrings.title_assets, buyTab: lstrings.title_buy, + buyTabAlt: lstrings.loan_fragment_deposit, sellTab: lstrings.title_sell, swapTab: lstrings.title_exchange, extraTab: lstrings[extraTabString], @@ -187,6 +190,17 @@ const Tab = ({ const theme = useTheme() const insets = useSafeAreaInsets() const color = isActive ? theme.tabBarIconHighlighted : theme.tabBarIcon + const [countryCode, setCountryCode] = React.useState() + + // Set countryCode once + useAsyncEffect( + async () => { + const countryCode = await getCountryCodeByIp().catch(() => '') + setCountryCode(countryCode) + }, + [], + 'countryCode' + ) const icon: { readonly [key: string]: JSX.Element } = { homeTab: , @@ -227,7 +241,7 @@ const Tab = ({ {icon[route.name]} )