From 0b68ab8ddf65fcf537362656853dc6496e1905b1 Mon Sep 17 00:00:00 2001 From: omritoptix Date: Fri, 13 Dec 2024 16:09:40 +0100 Subject: [PATCH] Added ability to override bech32 with env var. --- rollappd/cmd/root.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rollappd/cmd/root.go b/rollappd/cmd/root.go index e97a580..b1794ce 100644 --- a/rollappd/cmd/root.go +++ b/rollappd/cmd/root.go @@ -145,7 +145,12 @@ func initRootCmd( ) { // Set config sdkconfig := sdk.GetConfig() - utils.SetPrefixes(sdkconfig, app.AccountAddressPrefix) + // Add ability to override bech32 prefix from env variable + prefix := os.Getenv("OVERRIDE_BECH32") + if prefix == "" { + prefix = app.AccountAddressPrefix + } + utils.SetPrefixes(sdkconfig, prefix) evmosconfig.SetBip44CoinType(sdkconfig) sdkconfig.Seal()