diff --git a/x/stake/cross_stake/cross_stake.go b/x/stake/cross_stake/cross_stake.go index b7357643e..73e9d90d7 100644 --- a/x/stake/cross_stake/cross_stake.go +++ b/x/stake/cross_stake/cross_stake.go @@ -227,18 +227,9 @@ func (app *CrossStakeApp) handleUndelegate(ctx sdk.Context, pack *types.CrossSta }, errCode, nil } - validator, found := app.stakeKeeper.GetValidator(ctx, pack.Validator) - if !found { - errCode = CrossStakeErrBadDelegation - return sdk.ExecuteResult{ - Err: types.ErrNoValidatorFound(app.stakeKeeper.Codespace()), - }, errCode, nil - } - - if sdk.IsUpgrade(sdk.FirstSunsetFork) && !validator.IsSelfDelegator(delAddr) { + if sdk.IsUpgrade(sdk.FirstSunsetFork) { // unbound the delegation directly, do not wait for the breathe block // this is to prevent too many user get the coins back in the breathe block - // but self delegation still needs to wait until the unbonding period _, _, err := app.stakeKeeper.UnboundDelegation(ctx.WithCrossStake(true), delAddr, pack.Validator, shares) if err != nil { diff --git a/x/stake/handler_sidechain.go b/x/stake/handler_sidechain.go index 75fa531e1..2b4582e0f 100644 --- a/x/stake/handler_sidechain.go +++ b/x/stake/handler_sidechain.go @@ -442,15 +442,9 @@ func handleMsgSideChainUndelegate(ctx sdk.Context, msg MsgSideChainUndelegate, k events sdk.Events ) - validator, found := k.GetValidator(ctx, msg.ValidatorAddr) - if !found { - return types.ErrNoValidatorFound(k.Codespace()).Result() - } - - if sdk.IsUpgrade(sdk.FirstSunsetFork) && !validator.IsSelfDelegator(msg.DelegatorAddr) { + if sdk.IsUpgrade(sdk.FirstSunsetFork) { // unbound the delegation directly, do not wait for the breathe block // this is to prevent too many user get the coins back in the breathe block - // but self delegation still needs to wait until the unbonding period ubd, events, err = k.UnboundDelegation(ctx, msg.DelegatorAddr, msg.ValidatorAddr, shares) if err != nil {