@@ -42,11 +42,6 @@ const getWithdrawMessage = (agentType: AgentType) => {
42
42
}
43
43
} ;
44
44
45
- const agentsWithWithdrawalsComingSoon : AgentType [ ] = [
46
- AgentType . Modius ,
47
- AgentType . Memeooorr ,
48
- ] ;
49
-
50
45
const ServiceNotRunning = ( ) => (
51
46
< div className = "mt-8" >
52
47
< InfoCircleOutlined style = { { color : COLOR . TEXT_LIGHT } } />
@@ -78,11 +73,7 @@ const CompatibleMessage = () => (
78
73
) ;
79
74
80
75
export const WithdrawFunds = ( ) => {
81
- const {
82
- selectedService,
83
- refetch : refetchServices ,
84
- selectedAgentType,
85
- } = useServices ( ) ;
76
+ const { selectedService, refetch : refetchServices } = useServices ( ) ;
86
77
const { refetch : refetchMasterWallets } = useMasterWalletContext ( ) ;
87
78
const { updateBalances } = useBalanceContext ( ) ;
88
79
@@ -102,11 +93,6 @@ export const WithdrawFunds = () => {
102
93
currentStakingContractInfo : selectedStakingContractDetails ,
103
94
} ) ;
104
95
105
- const isComingSoon = useMemo (
106
- ( ) => agentsWithWithdrawalsComingSoon . includes ( selectedAgentType ) ,
107
- [ selectedAgentType ] ,
108
- ) ;
109
-
110
96
const showModal = useCallback ( ( ) => {
111
97
setIsModalVisible ( true ) ;
112
98
} , [ ] ) ;
@@ -175,28 +161,22 @@ export const WithdrawFunds = () => {
175
161
onClick = { showModal }
176
162
block
177
163
size = "large"
178
- disabled = {
179
- ! service || ! isServiceStakedForMinimumDuration || isComingSoon
180
- }
164
+ disabled = { ! service || ! isServiceStakedForMinimumDuration }
181
165
>
182
166
Withdraw all funds
183
167
</ Button >
184
168
) ,
185
- [ showModal , service , isServiceStakedForMinimumDuration , isComingSoon ] ,
169
+ [ showModal , service , isServiceStakedForMinimumDuration ] ,
186
170
) ;
187
171
188
172
const withdrawAllTooltip = useMemo ( ( ) => {
189
- if ( isComingSoon ) {
190
- return 'Available soon!' ;
191
- }
192
-
193
173
// countdown to withdrawal
194
174
if ( ! isServiceStakedForMinimumDuration ) {
195
175
return `${ minDurationMessage } ${ countdownDisplay } ` ;
196
176
}
197
177
198
178
return null ;
199
- } , [ countdownDisplay , isComingSoon , isServiceStakedForMinimumDuration ] ) ;
179
+ } , [ countdownDisplay , isServiceStakedForMinimumDuration ] ) ;
200
180
201
181
const modalButtonText = useMemo ( ( ) => {
202
182
if ( isWithdrawalLoading ) return 'Loading' ;
@@ -208,9 +188,13 @@ export const WithdrawFunds = () => {
208
188
209
189
return (
210
190
< >
211
- < Tooltip title = { < Text className = "text-sm" > { withdrawAllTooltip } </ Text > } >
212
- { withdrawAllButton }
213
- </ Tooltip >
191
+ { withdrawAllTooltip ? (
192
+ < Tooltip title = { < Text className = "text-sm" > { withdrawAllTooltip } </ Text > } >
193
+ { withdrawAllButton }
194
+ </ Tooltip >
195
+ ) : (
196
+ withdrawAllButton
197
+ ) }
214
198
215
199
{ ! isServiceRunning && < ServiceNotRunning /> }
216
200
0 commit comments