Skip to content

Commit

Permalink
add update-validator to msg validation
Browse files Browse the repository at this point in the history
  • Loading branch information
puneet2019 committed May 29, 2024
1 parent 25795a1 commit 405f3e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion x/liquidstakeibc/keeper/icq.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func DelegationUpdateCallback(k Keeper, ctx sdk.Context, data []byte, query icqt
validator, found := hc.GetValidator(delegation.ValidatorAddress)
if !found {
return fmt.Errorf(
"validator %s for host chain %s not found",
"delegation for validator %s for host chain %s not found",
delegation.ValidatorAddress,
query.ChainId,
)
Expand Down
5 changes: 5 additions & 0 deletions x/liquidstakeibc/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@ func (m *MsgUpdateHostChain) ValidateBasic() error {
if err := sdk.ValidateDenom(params.Denom); err != nil {
return fmt.Errorf("invalid rewards denom: %s", err.Error())
}
case KeyForceUpdateValidator:
_, _, err := bech32.DecodeAndConvert(update.Value)
if err != nil {
return err
}
default:
return fmt.Errorf("invalid or unexpected update key: %s", update.Key)
}
Expand Down

0 comments on commit 405f3e6

Please sign in to comment.