Skip to content

Commit d7be96c

Browse files
committed
staking: unreachable condition in tokensWithdrawable function
1 parent b94b694 commit d7be96c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

contracts/staking/libs/Stakes.sol

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,6 @@ library Stakes {
176176
if (stake.tokensLockedUntil == 0 || block.number < stake.tokensLockedUntil) {
177177
return 0;
178178
}
179-
// Cannot withdraw more than currently staked
180-
// This condition can happen if while tokens are locked for withdrawal a slash condition happens
181-
// In that case the total staked tokens could be below the amount to be withdrawn
182-
if (stake.tokensLocked > stake.tokensStaked) {
183-
return stake.tokensStaked;
184-
}
185179
return stake.tokensLocked;
186180
}
187181
}

0 commit comments

Comments
 (0)