From 23c85fb0e6aca3eea480fcaf26905fe7c83039cc Mon Sep 17 00:00:00 2001 From: Ajaz Ahmed Ansari Date: Tue, 13 Jun 2023 18:47:25 +0530 Subject: [PATCH] handle is_118 update prop --- app/upgrades/types.go | 1 + app/upgrades/upgrades.go | 1 + x/interchainstaking/keeper/proposal_handler.go | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/app/upgrades/types.go b/app/upgrades/types.go index c3fed7f19..8e08085f5 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -26,6 +26,7 @@ const ( V010402rc7UpgradeName = "v1.4.2-rc7" V010403rc0UpgradeName = "v1.4.3-rc0" V010404beta0UpgradeName = "v1.4.4-beta.0" + V010404beta1UpgradeName = "v1.4.4-beta.1" ) // Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal diff --git a/app/upgrades/upgrades.go b/app/upgrades/upgrades.go index faee35e1e..67150214e 100644 --- a/app/upgrades/upgrades.go +++ b/app/upgrades/upgrades.go @@ -27,6 +27,7 @@ func Upgrades() []Upgrade { {UpgradeName: V010402rc7UpgradeName, CreateUpgradeHandler: NoOpHandler}, {UpgradeName: V010403rc0UpgradeName, CreateUpgradeHandler: V010403rc0UpgradeHandler}, {UpgradeName: V010404beta0UpgradeName, CreateUpgradeHandler: V010404beta0UpgradeHandler}, + {UpgradeName: V010404beta1UpgradeName, CreateUpgradeHandler: NoOpHandler}, } } diff --git a/x/interchainstaking/keeper/proposal_handler.go b/x/interchainstaking/keeper/proposal_handler.go index 77e63455d..80ac4ae7f 100644 --- a/x/interchainstaking/keeper/proposal_handler.go +++ b/x/interchainstaking/keeper/proposal_handler.go @@ -197,6 +197,13 @@ func (k *Keeper) HandleUpdateZoneProposal(ctx sdk.Context, p *types.UpdateZonePr case "account_prefix": zone.AccountPrefix = change.Value + case "is_118": + boolValue, err := strconv.ParseBool(change.Value) + if err != nil { + return err + } + zone.Is_118 = boolValue + case "connection_id": if !strings.HasPrefix(change.Value, "connection-") { return errors.New("unexpected connection format")