Skip to content

Commit a80b7b9

Browse files
Merge remote-tracking branch 'origin/staging' into chore/bump_middleware
2 parents ee9d79d + 10ab704 commit a80b7b9

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

frontend/components/YourWalletPage/WithdrawFunds.tsx

+11-27
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ const getWithdrawMessage = (agentType: AgentType) => {
4242
}
4343
};
4444

45-
const agentsWithWithdrawalsComingSoon: AgentType[] = [
46-
AgentType.Modius,
47-
AgentType.Memeooorr,
48-
];
49-
5045
const ServiceNotRunning = () => (
5146
<div className="mt-8">
5247
<InfoCircleOutlined style={{ color: COLOR.TEXT_LIGHT }} />
@@ -78,11 +73,7 @@ const CompatibleMessage = () => (
7873
);
7974

8075
export const WithdrawFunds = () => {
81-
const {
82-
selectedService,
83-
refetch: refetchServices,
84-
selectedAgentType,
85-
} = useServices();
76+
const { selectedService, refetch: refetchServices } = useServices();
8677
const { refetch: refetchMasterWallets } = useMasterWalletContext();
8778
const { updateBalances } = useBalanceContext();
8879

@@ -102,11 +93,6 @@ export const WithdrawFunds = () => {
10293
currentStakingContractInfo: selectedStakingContractDetails,
10394
});
10495

105-
const isComingSoon = useMemo(
106-
() => agentsWithWithdrawalsComingSoon.includes(selectedAgentType),
107-
[selectedAgentType],
108-
);
109-
11096
const showModal = useCallback(() => {
11197
setIsModalVisible(true);
11298
}, []);
@@ -175,28 +161,22 @@ export const WithdrawFunds = () => {
175161
onClick={showModal}
176162
block
177163
size="large"
178-
disabled={
179-
!service || !isServiceStakedForMinimumDuration || isComingSoon
180-
}
164+
disabled={!service || !isServiceStakedForMinimumDuration}
181165
>
182166
Withdraw all funds
183167
</Button>
184168
),
185-
[showModal, service, isServiceStakedForMinimumDuration, isComingSoon],
169+
[showModal, service, isServiceStakedForMinimumDuration],
186170
);
187171

188172
const withdrawAllTooltip = useMemo(() => {
189-
if (isComingSoon) {
190-
return 'Available soon!';
191-
}
192-
193173
// countdown to withdrawal
194174
if (!isServiceStakedForMinimumDuration) {
195175
return `${minDurationMessage} ${countdownDisplay}`;
196176
}
197177

198178
return null;
199-
}, [countdownDisplay, isComingSoon, isServiceStakedForMinimumDuration]);
179+
}, [countdownDisplay, isServiceStakedForMinimumDuration]);
200180

201181
const modalButtonText = useMemo(() => {
202182
if (isWithdrawalLoading) return 'Loading';
@@ -208,9 +188,13 @@ export const WithdrawFunds = () => {
208188

209189
return (
210190
<>
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+
)}
214198

215199
{!isServiceRunning && <ServiceNotRunning />}
216200

0 commit comments

Comments
 (0)