@@ -6,42 +6,29 @@ import {CheckBox} from '@components/CheckBox';
6
6
import { IceLabel } from '@components/Labels/IceLabel' ;
7
7
import { COLORS } from '@constants/colors' ;
8
8
import { LINKS } from '@constants/links' ;
9
- import { STAKING_ALLOCATION_MAX , STAKING_YEARS_MAX } from '@constants/staking' ;
10
9
import { SCREEN_SIDE_OFFSET } from '@constants/styles' ;
11
10
import { MainNavigationParams } from '@navigation/Main' ;
12
11
import { useNavigation } from '@react-navigation/native' ;
13
12
import { NativeStackNavigationProp } from '@react-navigation/native-stack' ;
14
13
import { usePreStaking } from '@screens/Staking/hooks/usePreStaking' ;
15
- import { balanceSummarySelector } from '@store/modules/Tokenomics/selectors' ;
16
14
import { CoinsStackIcon } from '@svg/CoinsStackIcon' ;
17
- import { YearsOutlineIcon } from '@svg/YearsOutlineIcon' ;
18
- import { isRTL , replaceString , t , tagRegex } from '@translations/i18n' ;
15
+ import { replaceString , t , tagRegex } from '@translations/i18n' ;
19
16
import { openLinkWithInAppBrowser } from '@utils/device' ;
20
- import { formatNumberString } from '@utils/numbers' ;
21
17
import { font } from '@utils/styles' ;
22
18
import React , { memo , RefObject , useMemo , useState } from 'react' ;
23
19
import { StyleSheet , Text , View } from 'react-native' ;
24
- import { useSelector } from 'react-redux' ;
25
20
import { isAndroid , rem } from 'rn-units' ;
26
21
27
- import { InfoRow } from './components/InfoRow' ;
28
-
29
22
type Props = {
30
23
parameters : RefObject < { years : number ; allocation : number } | null > ;
31
24
} ;
32
25
33
26
export const Footer = memo ( ( { parameters} : Props ) => {
34
27
const navigation =
35
28
useNavigation < NativeStackNavigationProp < MainNavigationParams > > ( ) ;
36
- const { preStakingSummary, preStakingLoading, confirmPreStaking} =
37
- usePreStaking ( ) ;
29
+ const { preStakingLoading, confirmPreStaking} = usePreStaking ( ) ;
38
30
const [ termsAccepted , setTermsAccepted ] = useState ( false ) ;
39
- const maxValuesSet =
40
- preStakingSummary ?. years === STAKING_YEARS_MAX &&
41
- preStakingSummary . allocation === STAKING_ALLOCATION_MAX ;
42
- const buttonDisabled = ! termsAccepted || maxValuesSet ;
43
-
44
- const balanceSummary = useSelector ( balanceSummarySelector ) ;
31
+ const buttonDisabled = ! termsAccepted ;
45
32
46
33
const onStakePress = ( ) => {
47
34
navigation . navigate ( {
@@ -90,29 +77,6 @@ export const Footer = memo(({parameters}: Props) => {
90
77
) ) ;
91
78
} , [ ] ) ;
92
79
93
- if ( maxValuesSet ) {
94
- return (
95
- < >
96
- < InfoRow
97
- key = { 'staking.period' }
98
- style = { [ styles . infoRowContainer , styles . infoRowContainerTop ] }
99
- Icon = { YearsOutlineIcon }
100
- label = { t ( 'staking.period_label' ) }
101
- value = { preStakingSummary ?. years ?? '0' }
102
- unit = { t ( 'global.years' ) . toLowerCase ( ) }
103
- />
104
- < InfoRow
105
- key = { 'staking.balance' }
106
- style = { styles . infoRowContainer }
107
- Icon = { CoinsStackIcon }
108
- label = { t ( 'staking.balance_label' ) }
109
- value = { formatNumberString ( balanceSummary ?. preStaking ?? '0' ) }
110
- unit = { < IceLabel reversed = { isRTL } color = { COLORS . primaryLight } /> }
111
- />
112
- </ >
113
- ) ;
114
- }
115
-
116
80
return (
117
81
< View style = { styles . container } >
118
82
< View style = { styles . checkboxRow } >
0 commit comments