Make the environment variables actually work

This commit is contained in:
Jordan Oroshiba 2023-07-17 15:53:22 +02:00
parent 35794121f5
commit 70e8118b27

View file

@ -20,13 +20,13 @@ func sendTransactionToSequencer(ctx context.Context, txBytes []byte) error {
chainID, cometbftRPCEndpoint string
)
envChainId := os.Getenv("CHAIN_ID")
if envChainId == "" {
chainID = os.Getenv("CHAIN_ID")
if chainID == "" {
chainID = defaultChainID
}
envCometbftRPCEndpoint := os.Getenv("COMETBFT_RPC_ENDPOINT")
if envCometbftRPCEndpoint == "" {
cometbftRPCEndpoint = os.Getenv("COMETBFT_RPC_ENDPOINT")
if cometbftRPCEndpoint == "" {
cometbftRPCEndpoint = defaultCometbftRPCEndpoint
}