Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
d3d6912590
commit
44636659e3
@ -79,12 +79,14 @@ contract GhostStaking is IStaking, GhostAccessControlled {
|
||||
bool isRebase,
|
||||
bool isClaim
|
||||
) external override returns (uint256 returnAmount) {
|
||||
if (locks[to] && to != msg.sender) revert ExternalDepositsLocked();
|
||||
|
||||
returnAmount = amount + rebase();
|
||||
IERC20(ftso).safeTransferFrom(msg.sender, address(this), amount);
|
||||
|
||||
if (isClaim && warmupPeriod == 0) {
|
||||
returnAmount = _sendStnkBased(returnAmount, to, isRebase);
|
||||
} else {
|
||||
if (locks[to] && to != msg.sender) revert ExternalDepositsLocked();
|
||||
uint48 expiry = epoch.number + warmupPeriod;
|
||||
IGhostWarmup(warmup).addToWarmup(returnAmount, to, expiry);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user