File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ func (d *delegations) DisableAutoRenew(delegationID thor.Bytes32) error {
115115 if delegation .Stake .Sign () == 0 {
116116 return errors .New ("delegation is not active" )
117117 }
118+ if validation .Status == StatusExit {
119+ return errors .New ("delegation is not active, withdraw is available" )
120+ }
118121
119122 weight := delegation .Weight ()
120123
@@ -158,6 +161,9 @@ func (d *delegations) EnableAutoRenew(delegationID thor.Bytes32) error {
158161 if delegation .AutoRenew {
159162 return errors .New ("delegation is already autoRenew" )
160163 }
164+ if validation .Status == StatusExit {
165+ return errors .New ("delegation is not active, withdraw is available" )
166+ }
161167 weight := delegation .Weight ()
162168
163169 // validate that the enablement does not exceed the max stake considering next staking period changes
You can’t perform that action at this time.
0 commit comments