Files
Igor Sirotin cfeef44f27 refactor: build default networks from params.WalletConfig (#7747)
BuildDefaultNetworks took requests.WalletSecretsConfig, the raw wire
struct, reaching past the translation that already exists in
buildWalletConfig. It now takes params.WalletConfig, which already
carried six of the seven fields it needs.

PoktAPIKey is added to params.WalletConfig alongside the other provider
keys; it was the only field missing.

This drops networkdefaults' dependency on internal/protocol/requests,
and with it the whole protocol package graph.
2026-08-26 18:05:02 +01:00

18 lines
579 B
Go

package common
import (
"os"
"github.com/status-im/status-go/params"
"github.com/status-im/status-go/pkg/security"
)
func GetWalletConfigFromEnv() *params.WalletConfig {
return &params.WalletConfig{
StatusProxyStageName: os.Getenv("STATUS_BUILD_PROXY_STAGE_NAME"),
EthRpcProxyUser: security.NewSensitiveString(os.Getenv("STATUS_BUILD_ETH_RPC_PROXY_USER")),
EthRpcProxyPassword: security.NewSensitiveString(os.Getenv("STATUS_BUILD_ETH_RPC_PROXY_PASSWORD")),
EthRpcProxyUrl: security.NewSensitiveString(os.Getenv("STATUS_BUILD_ETH_RPC_PROXY_URL")),
}
}