From f669d84882ceb7644967af0f8cad0b57f2ca5850 Mon Sep 17 00:00:00 2001 From: puneetmahajan Date: Tue, 2 Jul 2024 16:56:18 +0400 Subject: [PATCH 1/2] do not allow zero delegation unbondings --- x/liquidstakeibc/keeper/hooks.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/liquidstakeibc/keeper/hooks.go b/x/liquidstakeibc/keeper/hooks.go index de489301..57bd47be 100644 --- a/x/liquidstakeibc/keeper/hooks.go +++ b/x/liquidstakeibc/keeper/hooks.go @@ -712,7 +712,8 @@ func (k *Keeper) ValidatorUndelegationWorkflow(ctx sdk.Context, epoch int64) { for _, validator := range hc.Validators { // check if there are validators that need to be unbonded if validator.UnbondingEpoch > 0 && - validator.UnbondingEpoch+liquidstakeibctypes.UnbondingStateEpochLimit <= epoch { + validator.UnbondingEpoch+liquidstakeibctypes.UnbondingStateEpochLimit <= epoch && + validator.DelegatedAmount.GT(sdk.ZeroInt()) { // unbond all delegated tokens from the validator validatorUnbonding := &liquidstakeibctypes.ValidatorUnbonding{ From 5f825da36f7eb355340bb7740de606f1785863f9 Mon Sep 17 00:00:00 2001 From: puneetmahajan Date: Thu, 5 Dec 2024 15:27:04 +0400 Subject: [PATCH 2/2] add CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5921063..04105706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased +### Improvements + +- [855](https://github.com/persistenceOne/pstake-native/pull/855) Add condition for not allowing zero delegation unbondings icq + ## [v2.15.0] - 2024-05-30 ### Improvements