removed obsolete errors
Some checks failed
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline failed
ci/woodpecker/push/bump_version unknown status
ci/woodpecker/push/frontend Pipeline failed
Some checks failed
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline failed
ci/woodpecker/push/bump_version unknown status
ci/woodpecker/push/frontend Pipeline failed
This commit is contained in:
@@ -161,13 +161,16 @@ func (a *AccountAPI) initChainGateway(cfg *eapi.ChainGatewayConfig) error {
|
|||||||
return merrors.InvalidArgument("chain gateway configuration is not provided")
|
return merrors.InvalidArgument("chain gateway configuration is not provided")
|
||||||
}
|
}
|
||||||
|
|
||||||
address := strings.TrimSpace(os.Getenv(cfg.AddressEnv))
|
cfg.Address = strings.TrimSpace(cfg.Address)
|
||||||
if address == "" {
|
if cfg.Address == "" {
|
||||||
return merrors.InvalidArgument(fmt.Sprintf("chain gateway address env %s is empty", cfg.AddressEnv))
|
cfg.Address = strings.TrimSpace(os.Getenv(cfg.AddressEnv))
|
||||||
|
}
|
||||||
|
if cfg.Address == "" {
|
||||||
|
return merrors.InvalidArgument(fmt.Sprintf("chain gateway address is not specified and address env %s is empty", cfg.AddressEnv))
|
||||||
}
|
}
|
||||||
|
|
||||||
clientCfg := chaingatewayclient.Config{
|
clientCfg := chaingatewayclient.Config{
|
||||||
Address: address,
|
Address: cfg.Address,
|
||||||
DialTimeout: time.Duration(cfg.DialTimeoutSeconds) * time.Second,
|
DialTimeout: time.Duration(cfg.DialTimeoutSeconds) * time.Second,
|
||||||
CallTimeout: time.Duration(cfg.CallTimeoutSeconds) * time.Second,
|
CallTimeout: time.Duration(cfg.CallTimeoutSeconds) * time.Second,
|
||||||
Insecure: cfg.Insecure,
|
Insecure: cfg.Insecure,
|
||||||
@@ -216,6 +219,6 @@ func parseChainNetwork(value string) (gatewayv1.ChainNetwork, error) {
|
|||||||
case "", "CHAIN_NETWORK_UNSPECIFIED":
|
case "", "CHAIN_NETWORK_UNSPECIFIED":
|
||||||
return gatewayv1.ChainNetwork_CHAIN_NETWORK_UNSPECIFIED, merrors.InvalidArgument("chain network must be specified")
|
return gatewayv1.ChainNetwork_CHAIN_NETWORK_UNSPECIFIED, merrors.InvalidArgument("chain network must be specified")
|
||||||
default:
|
default:
|
||||||
return gatewayv1.ChainNetwork_CHAIN_NETWORK_UNSPECIFIED, merrors.InvalidArgument("unsupported chain network %s", value)
|
return gatewayv1.ChainNetwork_CHAIN_NETWORK_UNSPECIFIED, merrors.InvalidArgument(fmt.Sprintf("unsupported chain network %s", value))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user