mirror of
https://github.com/logos-co/staking.git
synced 2025-02-09 09:14:43 +00:00
chore(StakeManager): removed duplicate error type
This commit is contained in:
parent
c764142909
commit
694608a629
@ -16,7 +16,6 @@ contract StakeManager is Ownable {
|
|||||||
error StakeManager__PendingMigration();
|
error StakeManager__PendingMigration();
|
||||||
error StakeManager__SenderIsNotPreviousStakeManager();
|
error StakeManager__SenderIsNotPreviousStakeManager();
|
||||||
error StakeManager__InvalidLimitEpoch();
|
error StakeManager__InvalidLimitEpoch();
|
||||||
error StakeManager__InvalidLockupPeriod();
|
|
||||||
error StakeManager__AccountNotInitialized();
|
error StakeManager__AccountNotInitialized();
|
||||||
error StakeManager__InvalidMigration();
|
error StakeManager__InvalidMigration();
|
||||||
error StakeManager__AlreadyProcessedEpochs();
|
error StakeManager__AlreadyProcessedEpochs();
|
||||||
@ -135,7 +134,7 @@ contract StakeManager is Ownable {
|
|||||||
*/
|
*/
|
||||||
function stake(uint256 _amount, uint256 _time) external onlyVault noMigration processEpoch {
|
function stake(uint256 _amount, uint256 _time) external onlyVault noMigration processEpoch {
|
||||||
if (_time > 0 && (_time < MIN_LOCKUP_PERIOD || _time > MAX_LOCKUP_PERIOD)) {
|
if (_time > 0 && (_time < MIN_LOCKUP_PERIOD || _time > MAX_LOCKUP_PERIOD)) {
|
||||||
revert StakeManager__InvalidLockupPeriod();
|
revert StakeManager__InvalidLockTime();
|
||||||
}
|
}
|
||||||
Account storage account = accounts[msg.sender];
|
Account storage account = accounts[msg.sender];
|
||||||
if (account.lockUntil == 0) {
|
if (account.lockUntil == 0) {
|
||||||
@ -186,7 +185,7 @@ contract StakeManager is Ownable {
|
|||||||
*/
|
*/
|
||||||
function lock(uint256 _time) external onlyVault onlyInitialized(msg.sender) noMigration processEpoch {
|
function lock(uint256 _time) external onlyVault onlyInitialized(msg.sender) noMigration processEpoch {
|
||||||
if (_time > MAX_LOCKUP_PERIOD) {
|
if (_time > MAX_LOCKUP_PERIOD) {
|
||||||
revert StakeManager__InvalidLockupPeriod();
|
revert StakeManager__InvalidLockTime();
|
||||||
}
|
}
|
||||||
Account storage account = accounts[msg.sender];
|
Account storage account = accounts[msg.sender];
|
||||||
_processAccount(account, currentEpoch);
|
_processAccount(account, currentEpoch);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user