Skip to content

Commit

Permalink
using env package
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 committed Aug 15, 2024
1 parent 0abb177 commit 8539f88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/chains/evm/config/toml/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (

"github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big"
"github.com/smartcontractkit/chainlink/v2/core/config/env"
)

var (
CUSTOM_DEFAULTS_ENV_KEY = "CL_CHAIN_DEFAULTS"

//go:embed defaults/*.toml
defaultsFS embed.FS
Expand Down Expand Up @@ -76,7 +76,7 @@ func init() {
})

// read the custom defaults overrides
dir := os.Getenv(CUSTOM_DEFAULTS_ENV_KEY)
dir := os.Getenv(string(env.CustomDefaultsEnvKey))
if dir == "" {
// short-circuit; no default overrides provided
return
Expand Down
1 change: 1 addition & 0 deletions core/config/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var (
ThresholdKeyShare = Secret("CL_THRESHOLD_KEY_SHARE")
// Migrations env vars
EVMChainIDNotNullMigration0195 = "CL_EVM_CHAINID_NOT_NULL_MIGRATION_0195"
CustomDefaultsEnvKey = Var("CL_CHAIN_DEFAULTS")
)

// LOOPP commands and vars
Expand Down

0 comments on commit 8539f88

Please sign in to comment.