From 147adcfad7034a1ce542afa7a84876890443bf06 Mon Sep 17 00:00:00 2001 From: omritoptix Date: Wed, 11 Dec 2024 10:19:57 +0100 Subject: [PATCH] Added ability to override bech32 with env var. --- cmd/rollappd/cmd/root.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/rollappd/cmd/root.go b/cmd/rollappd/cmd/root.go index e95af1b9..2c520ec4 100644 --- a/cmd/rollappd/cmd/root.go +++ b/cmd/rollappd/cmd/root.go @@ -156,7 +156,12 @@ func initRootCmd( ) { // Set config sdkconfig := sdk.GetConfig() - rdk_utils.SetPrefixes(sdkconfig, app.AccountAddressPrefix) + // Add ability to override bech32 prefix from env variable + prefix := os.Getenv("OVERRIDE_BECH_32") + if prefix == "" { + prefix = app.AccountAddressPrefix + } + rdk_utils.SetPrefixes(sdkconfig, prefix) utils.SetBip44CoinType(sdkconfig) sdkconfig.Seal()