diff --git a/api/payments/orchestrator/config.dev.yml b/api/payments/orchestrator/config.dev.yml index 310f97e5..2239b23b 100644 --- a/api/payments/orchestrator/config.dev.yml +++ b/api/payments/orchestrator/config.dev.yml @@ -38,15 +38,10 @@ messaging: # Retain quote records after expiry to allow long-running payments to complete. quote_retention_hours: 72 -max_fx_quote_ttl_ms: 600000 - # Service endpoints are sourced from discovery; no static overrides. card_gateways: mcards: funding_address: "TUaWaCkiXwYPKm5qjcB27Lhwv976vPvedE" fee_wallet_ref: "697a062a248dc785125ccb9e" -fee_ledger_accounts: - mcards: "697a15cc72e95c92d4c5db01" - # Gateway instances and capabilities are sourced from service discovery. diff --git a/api/payments/orchestrator/config.yml b/api/payments/orchestrator/config.yml index 0f5e3f07..e7682871 100644 --- a/api/payments/orchestrator/config.yml +++ b/api/payments/orchestrator/config.yml @@ -38,15 +38,10 @@ messaging: # Retain quote records after expiry to allow long-running payments to complete. quote_retention_hours: 72 -max_fx_quote_ttl_ms: 600000 - # Service endpoints are sourced from discovery; no static overrides. card_gateways: mcards: funding_address: "TGBDXEg9rxSqGFJDcb889zqTjDwx1bmLRF" fee_wallet_ref: "694c124ed76f9f811ac57133" -fee_ledger_accounts: - mcards: "ledger:fees:monetix" - # Gateway instances and capabilities are sourced from service discovery. diff --git a/api/payments/orchestrator/internal/server/internal/builders.go b/api/payments/orchestrator/internal/server/internal/builders.go index abb65aa7..9cf701e6 100644 --- a/api/payments/orchestrator/internal/server/internal/builders.go +++ b/api/payments/orchestrator/internal/server/internal/builders.go @@ -27,22 +27,6 @@ func buildCardGatewayRoutes(src map[string]cardGatewayRouteConfig) map[string]or return result } -func buildFeeLedgerAccounts(src map[string]string) map[string]string { - if len(src) == 0 { - return nil - } - result := make(map[string]string, len(src)) - for key, account := range src { - k := strings.ToLower(strings.TrimSpace(key)) - v := strings.TrimSpace(account) - if k == "" || v == "" { - continue - } - result[k] = v - } - return result -} - func buildGatewayRegistry(logger mlogger.Logger, src []gatewayInstanceConfig, registry *discovery.Registry) orchestrator.GatewayRegistry { if logger != nil { logger = logger.Named("gateway_registry") diff --git a/api/payments/orchestrator/internal/server/internal/config.go b/api/payments/orchestrator/internal/server/internal/config.go index 5ca78f2c..504797dc 100644 --- a/api/payments/orchestrator/internal/server/internal/config.go +++ b/api/payments/orchestrator/internal/server/internal/config.go @@ -13,24 +13,9 @@ import ( type config struct { *grpcapp.Config `yaml:",inline"` - Fees clientConfig `yaml:"fees"` - Ledger clientConfig `yaml:"ledger"` - Gateway clientConfig `yaml:"gateway"` - PaymentGateway clientConfig `yaml:"payment_gateway"` - Mntx clientConfig `yaml:"mntx"` - Oracle clientConfig `yaml:"oracle"` CardGateways map[string]cardGatewayRouteConfig `yaml:"card_gateways"` - FeeAccounts map[string]string `yaml:"fee_ledger_accounts"` GatewayInstances []gatewayInstanceConfig `yaml:"gateway_instances"` QuoteRetentionHrs int `yaml:"quote_retention_hours"` - MaxFXQuoteTTLMs int64 `yaml:"max_fx_quote_ttl_ms"` -} - -type clientConfig struct { - Address string `yaml:"address"` - DialTimeoutSecs int `yaml:"dial_timeout_seconds"` - CallTimeoutSecs int `yaml:"call_timeout_seconds"` - InsecureTransport bool `yaml:"insecure"` } type cardGatewayRouteConfig struct { @@ -79,18 +64,6 @@ type limitsOverrideCfg struct { MaxOps int `yaml:"max_ops"` } -const ( - defaultMaxFXQuoteTTL = 10 * time.Minute - defaultMaxFXQuoteTTLMillis = int64(defaultMaxFXQuoteTTL / time.Millisecond) -) - -func (c clientConfig) callTimeout() time.Duration { - if c.CallTimeoutSecs <= 0 { - return 3 * time.Second - } - return time.Duration(c.CallTimeoutSecs) * time.Second -} - func (c *config) quoteRetention() time.Duration { if c == nil || c.QuoteRetentionHrs <= 0 { return 72 * time.Hour @@ -98,13 +71,6 @@ func (c *config) quoteRetention() time.Duration { return time.Duration(c.QuoteRetentionHrs) * time.Hour } -func (c *config) maxFXQuoteTTLMillis() int64 { - if c == nil || c.MaxFXQuoteTTLMs <= 0 { - return defaultMaxFXQuoteTTLMillis - } - return c.MaxFXQuoteTTLMs -} - func (i *Imp) loadConfig() (*config, error) { data, err := os.ReadFile(i.file) if err != nil {