Skip to content

Commit

Permalink
fix: Incorrect bookkeeping of validator’s delegated amount upon (#725)
Browse files Browse the repository at this point in the history
* fix: Incorrect bookkeeping of validator’s delegated amount upon
     redelegation

* udpate CHANGELOG.md

---------

Co-authored-by: Marc Puig <[email protected]>
  • Loading branch information
puneet2019 and kruspy authored Jan 19, 2024
1 parent 5b76763 commit 85fad38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
- [720](https://github.com/persistenceOne/pstake-native/pull/720) Fix unbondings loop.
- [719](https://github.com/persistenceOne/pstake-native/pull/719) Fix afterEpoch hooks to take LiquidStake feature
instead of LiquidStakeIBC
- [725](https://github.com/persistenceOne/pstake-native/pull/725) Fix Incorrect bookkeeping of validator’s delegated
amount upon redelegation

## [v2.8.2] - 2024-01-09

Expand Down
2 changes: 1 addition & 1 deletion x/liquidstakeibc/keeper/ica_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func (k *Keeper) HandleMsgBeginRedelegate(
)
}

fromValidator.DelegatedAmount = fromValidator.DelegatedAmount.Add(parsedMsg.Amount.Amount)
fromValidator.DelegatedAmount = fromValidator.DelegatedAmount.Sub(parsedMsg.Amount.Amount)
k.SetHostChainValidator(ctx, hc, fromValidator)

// add redelegation entry.
Expand Down

0 comments on commit 85fad38

Please sign in to comment.