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 isRebase,
|
||||||
bool isClaim
|
bool isClaim
|
||||||
) external override returns (uint256 returnAmount) {
|
) external override returns (uint256 returnAmount) {
|
||||||
|
if (locks[to] && to != msg.sender) revert ExternalDepositsLocked();
|
||||||
|
|
||||||
returnAmount = amount + rebase();
|
returnAmount = amount + rebase();
|
||||||
IERC20(ftso).safeTransferFrom(msg.sender, address(this), amount);
|
IERC20(ftso).safeTransferFrom(msg.sender, address(this), amount);
|
||||||
|
|
||||||
if (isClaim && warmupPeriod == 0) {
|
if (isClaim && warmupPeriod == 0) {
|
||||||
returnAmount = _sendStnkBased(returnAmount, to, isRebase);
|
returnAmount = _sendStnkBased(returnAmount, to, isRebase);
|
||||||
} else {
|
} else {
|
||||||
if (locks[to] && to != msg.sender) revert ExternalDepositsLocked();
|
|
||||||
uint48 expiry = epoch.number + warmupPeriod;
|
uint48 expiry = epoch.number + warmupPeriod;
|
||||||
IGhostWarmup(warmup).addToWarmup(returnAmount, to, expiry);
|
IGhostWarmup(warmup).addToWarmup(returnAmount, to, expiry);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user