Skip to content

Commit

Permalink
fix: env reading
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrynenko committed Dec 13, 2024
1 parent d3f92e5 commit c3ad492
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions internal/config/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,14 @@ func (e *ethereum) NetworkConfig() *NetworkConfig {
}

func retrieveVaultPrivateKey(result NetworkConfig) (*ecdsa.PrivateKey, error) {
if err := dig.Out(&result).
Where(map[string]interface{}{
"rpc": result.Client,
"vault_address": result.Address,
"vault_mount_path": result.MountPath,
"gas_multiplier": result.GasMultiplier,
}).Now(); err != nil {
vaultCfg := struct {
Token string `dig:"VAULT_TOKEN,clear"`
}{}

if err := dig.Out(&vaultCfg).Now(); err != nil {
panic(err)
}
result.Token = vaultCfg.Token

conf := vaultapi.DefaultConfig()
conf.Address = result.Address
Expand Down

0 comments on commit c3ad492

Please sign in to comment.