@@ -51,6 +51,10 @@ import {
5151import { capitalize } from '../../../utils/helpers' ;
5252import DetectSwipe from '../../../components/DetectSwipe' ;
5353import type { WalletScreenProps } from '../../../navigation/types' ;
54+ import { showToast } from '../../../utils/notifications' ;
55+ import { useTranslation } from 'react-i18next' ;
56+ import { ignoresHideBalanceToastSelector } from '../../../store/reselect/user' ;
57+ import { ignoreHideBalanceToast } from '../../../store/slices/user' ;
5458
5559const updateHeight = ( { height, toValue = 0 , duration = 250 } ) : void => {
5660 try {
@@ -94,6 +98,9 @@ const WalletsDetail = ({
9498 enableSwipeToHideBalanceSelector ,
9599 ) ;
96100 const hideBalance = useAppSelector ( hideBalanceSelector ) ;
101+ const ignoresHideBalanceToast = useAppSelector (
102+ ignoresHideBalanceToastSelector ,
103+ ) ;
97104 const [ _ , switchUnit ] = useSwitchUnit ( ) ;
98105 const colors = useColors ( ) ;
99106 const size = useSharedValue ( { width : 0 , height : 0 } ) ;
@@ -102,6 +109,7 @@ const WalletsDetail = ({
102109 const [ radiusContainerHeight , setRadiusContainerHeight ] = useState ( 400 ) ;
103110 const [ headerHeight , setHeaderHeight ] = useState ( 0 ) ;
104111 const height = useSharedValue ( 0 ) ;
112+ const { t } = useTranslation ( 'wallet' ) ;
105113
106114 const activityPadding = useMemo (
107115 ( ) => ( { paddingTop : radiusContainerHeight , paddingBottom : 230 } ) ,
@@ -113,7 +121,16 @@ const WalletsDetail = ({
113121 } , [ height , headerHeight ] ) ;
114122
115123 const toggleHideBalance = ( ) : void => {
116- dispatch ( updateSettings ( { hideBalance : ! hideBalance } ) ) ;
124+ const enabled = ! hideBalance ;
125+ dispatch ( updateSettings ( { hideBalance : enabled } ) ) ;
126+ if ( ! ignoresHideBalanceToast && enabled ) {
127+ showToast ( {
128+ type : 'info' ,
129+ title : t ( 'balance_hidden_title' ) ,
130+ description : t ( 'balance_hidden_message' ) ,
131+ } ) ;
132+ dispatch ( ignoreHideBalanceToast ( ) ) ;
133+ }
117134 } ;
118135
119136 const onScroll = useCallback (
0 commit comments