diff --git a/app/app.go b/app/app.go index 1c7c51e70f..6048a84032 100644 --- a/app/app.go +++ b/app/app.go @@ -186,6 +186,7 @@ var Upgrades = []upgrades.Upgrade{ upgrades.Upgrade_0_34_0, upgrades.Upgrade_0_35_0, upgrades.Upgrade_1_0_0, + upgrades.Upgrade_1_0_1, } // this line is used by starport scaffolding # stargate/wasm/app/enabledProposals diff --git a/app/upgrades/empty_upgrades.go b/app/upgrades/empty_upgrades.go index 125528b489..a625b72a5d 100644 --- a/app/upgrades/empty_upgrades.go +++ b/app/upgrades/empty_upgrades.go @@ -217,3 +217,9 @@ var Upgrade_1_0_0 = Upgrade{ CreateUpgradeHandler: defaultUpgradeHandler, StoreUpgrades: store.StoreUpgrades{}, } + +var Upgrade_1_0_1 = Upgrade{ + UpgradeName: "v1.0.1", + CreateUpgradeHandler: defaultUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{}, +} diff --git a/x/pairing/keeper/unstaking.go b/x/pairing/keeper/unstaking.go index 516a0233e1..a9c0025a16 100644 --- a/x/pairing/keeper/unstaking.go +++ b/x/pairing/keeper/unstaking.go @@ -160,6 +160,9 @@ func (k Keeper) SlashDelegator(ctx sdk.Context, slashingInfo types.DelegatorSlas for _, entry := range unbonding.Entries { totalBalance = totalBalance.Add(entry.Balance) } + if totalBalance.IsZero() { + continue + } slashingFactor := total.ToLegacyDec().QuoInt(totalBalance) slashingFactor = sdk.MinDec(sdk.OneDec(), slashingFactor)