From 561b15e229b3dd70ba359c679adc44e9c315db2c Mon Sep 17 00:00:00 2001 From: Jesse Clark Date: Fri, 29 Sep 2023 18:38:21 +0300 Subject: [PATCH] Show message in header if testnet. --- src/ux/appHeader/index.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ux/appHeader/index.tsx b/src/ux/appHeader/index.tsx index 0a5cf6db1..08bfa159c 100644 --- a/src/ux/appHeader/index.tsx +++ b/src/ux/appHeader/index.tsx @@ -6,11 +6,16 @@ import OIcon from 'react-native-vector-icons/Octicons' import { useSafeAreaInsets } from 'react-native-safe-area-context' import { rootTabsRouteNames } from 'navigation/rootNavigator' -import { selectTopColor, selectWallet } from 'store/slices/settingsSlice' +import { + selectChainId, + selectTopColor, + selectWallet, +} from 'store/slices/settingsSlice' import { useAppSelector } from 'store/storeUtils' import { sharedColors } from 'shared/constants' import { AppTouchable } from 'components/appTouchable' import { castStyle } from 'shared/utils' +import { Typography } from 'src/components' import { ProfileHandler } from './ProfileHandler' @@ -20,6 +25,7 @@ export const AppHeader = ({ navigation, route }: HeaderProps) => { const insets = useSafeAreaInsets() const topColor = useAppSelector(selectTopColor) const wallet = useAppSelector(selectWallet) + const chainId = useAppSelector(selectChainId) const openMenu = useCallback(() => { if (route?.name === rootTabsRouteNames.Settings) { @@ -41,6 +47,11 @@ export const AppHeader = ({ navigation, route }: HeaderProps) => { {wallet && } + {chainId === 31 && ( + + TESTNET + + )}