Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed Mar 13, 2024
1 parent 78d82cb commit 88e7544
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions app/upgrades/empty_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
}
3 changes: 3 additions & 0 deletions x/pairing/keeper/unstaking.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 88e7544

Please sign in to comment.