Skip to content

Commit 47573b6

Browse files
committed
fix: cooldown
1 parent 5d0452e commit 47573b6

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/modules/sGho/SGhoDepositPanel.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,16 @@ export const SGHODepositPanel: React.FC<SGHODepositPanelProps> = ({
134134
openSwitch('', ChainId.mainnet);
135135
};
136136

137-
// Cooldown logic
138-
const stakeCooldownSeconds = stakeData?.stakeCooldownSeconds || 0;
137+
// Cooldown logic - sGHO has instant withdrawal no cooldown mechanism
138+
const stakeCooldownSeconds = 0;
139139
const userCooldown = stakeUserData?.userCooldownTimestamp || 0;
140-
const stakeUnstakeWindow = stakeData?.stakeUnstakeWindow || 0;
140+
const stakeUnstakeWindow = 0; // sGHO has no unstake window
141141

142142
const userCooldownDelta = now - userCooldown;
143-
const isCooldownActive = userCooldownDelta < stakeCooldownSeconds + stakeUnstakeWindow;
144-
const isUnstakeWindowActive =
145-
isCooldownActive &&
146-
userCooldownDelta > stakeCooldownSeconds &&
147-
userCooldownDelta < stakeUnstakeWindow + stakeCooldownSeconds;
143+
// For sGHO, cooldown is always inactive since withdrawal is instant
144+
const isCooldownActive = false;
145+
const isUnstakeWindowActive = false;
148146

149-
// Others
150147
const availableToStake = formatEther(
151148
BigNumber.from(stakeUserData?.underlyingTokenUserBalance || '0')
152149
);

0 commit comments

Comments
 (0)