Skip to content

Commit

Permalink
Remove chain from description in hooks. Use BankKeeper.SetDenomMetadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Witkowski committed Nov 2, 2023
1 parent 52a4b54 commit 3e79d44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion x/ibchooks/marker_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 3e79d44

Please sign in to comment.