From 4ce9b6781b7054773611e7a0a40dad1a6817389d Mon Sep 17 00:00:00 2001 From: tnv1 Date: Wed, 27 Mar 2024 16:27:27 +0700 Subject: [PATCH] Fix bech32 addr prefix --- app/app.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/app.go b/app/app.go index 22863efb..89ab6530 100644 --- a/app/app.go +++ b/app/app.go @@ -126,7 +126,7 @@ const appName = "FeeApp" // We pull these out so we can set them with LDFLAGS in the Makefile var ( NodeDir = ".feeapp" - Bech32Prefix = "cosmos" + Bech32Prefix = "feeabs" ) // These constants are derived from the above variables. @@ -350,8 +350,8 @@ func NewFeeApp( runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, - authcodec.NewBech32Codec(sdk.Bech32MainPrefix), - sdk.Bech32MainPrefix, + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + sdk.GetConfig().GetBech32AccountAddrPrefix(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.BankKeeper = bankkeeper.NewBaseKeeper( @@ -379,8 +379,8 @@ func NewFeeApp( app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), - authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), - authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), ) app.MintKeeper = mintkeeper.NewKeeper( appCodec,