Skip to content

Commit

Permalink
feat(build): add ability to override bech32 with env var (#405)
Browse files Browse the repository at this point in the history
Co-authored-by: Victor Pham <[email protected]>
  • Loading branch information
omritoptix and VictorTrustyDev authored Dec 13, 2024
1 parent 23ecd7a commit 70dddc2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/rollappd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 := app.AccountAddressPrefix
if overridePrefix := os.Getenv("OVERRIDE_BECH32"); overridePrefix != "" {
prefix = overridePrefix
}
rdk_utils.SetPrefixes(sdkconfig, prefix)
utils.SetBip44CoinType(sdkconfig)
sdkconfig.Seal()

Expand Down

0 comments on commit 70dddc2

Please sign in to comment.