From 0cc89f57547482905af5d716f6f7271968052e56 Mon Sep 17 00:00:00 2001 From: GnaD13 Date: Tue, 31 Oct 2023 11:30:35 +0700 Subject: [PATCH] fix set hostzone --- x/feeabs/keeper/proposal.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/x/feeabs/keeper/proposal.go b/x/feeabs/keeper/proposal.go index ee4fef33..44074440 100644 --- a/x/feeabs/keeper/proposal.go +++ b/x/feeabs/keeper/proposal.go @@ -45,7 +45,14 @@ func (k Keeper) SetHostZoneProposal(ctx sdk.Context, p *types.SetHostZoneProposa return types.ErrHostZoneConfigNotFound } - err := k.SetHostZoneConfig(ctx, *p.HostChainConfig) + // Delete all hostzone + err := k.DeleteHostZoneConfig(ctx, p.HostChainConfig.IbcDenom) + if err != nil { + return err + } + + // set new hostzone + err = k.SetHostZoneConfig(ctx, *p.HostChainConfig) if err != nil { return err }