From 3e79d44342e8ac109dfb13a845339c7b4d8389df Mon Sep 17 00:00:00 2001 From: Matthew Witkowski Date: Thu, 2 Nov 2023 17:24:32 -0400 Subject: [PATCH] Remove chain from description in hooks. Use BankKeeper.SetDenomMetadata. --- app/upgrades.go | 6 +----- x/ibchooks/marker_hooks.go | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/upgrades.go b/app/upgrades.go index 04812c899e..dcd1945508 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -12,7 +12,6 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -410,10 +409,7 @@ func updateIbcMarkerDenomMetadata(ctx sdk.Context, app *App) { Display: chainID + "/" + denomTrace.BaseDenom, Description: denomTrace.BaseDenom + " from " + chainID, } - err := app.MarkerKeeper.SetDenomMetaData(ctx, markerMetadata, authtypes.NewModuleAddress(types.ModuleName)) - if err != nil { - ctx.Logger().Error(fmt.Sprintf("unable to set denom metadata for %v with base denom %v and chain-id %v: %v", record.GetDenom(), denomTrace.BaseDenom, chainID, err)) - } + app.BankKeeper.SetDenomMetaData(ctx, markerMetadata) } return false diff --git a/x/ibchooks/marker_hooks.go b/x/ibchooks/marker_hooks.go index 95d8069b31..73f86e61e9 100644 --- a/x/ibchooks/marker_hooks.go +++ b/x/ibchooks/marker_hooks.go @@ -119,7 +119,7 @@ func (h MarkerHooks) addDenomMetaData(ctx sdktypes.Context, packet exported.Pack Base: ibcDenom, Name: chainID + "/" + data.Denom, Display: chainID + "/" + data.Denom, - Description: data.Denom + " from chain " + chainID, + Description: data.Denom + " from " + chainID, } return h.MarkerKeeper.SetDenomMetaData(ctx, markerMetadata, authtypes.NewModuleAddress(types.ModuleName)) }