removed dead mntx dependency + dead settings
This commit is contained in:
@@ -38,15 +38,10 @@ messaging:
|
|||||||
# Retain quote records after expiry to allow long-running payments to complete.
|
# Retain quote records after expiry to allow long-running payments to complete.
|
||||||
quote_retention_hours: 72
|
quote_retention_hours: 72
|
||||||
|
|
||||||
max_fx_quote_ttl_ms: 600000
|
|
||||||
|
|
||||||
# Service endpoints are sourced from discovery; no static overrides.
|
# Service endpoints are sourced from discovery; no static overrides.
|
||||||
card_gateways:
|
card_gateways:
|
||||||
mcards:
|
mcards:
|
||||||
funding_address: "TUaWaCkiXwYPKm5qjcB27Lhwv976vPvedE"
|
funding_address: "TUaWaCkiXwYPKm5qjcB27Lhwv976vPvedE"
|
||||||
fee_wallet_ref: "697a062a248dc785125ccb9e"
|
fee_wallet_ref: "697a062a248dc785125ccb9e"
|
||||||
|
|
||||||
fee_ledger_accounts:
|
|
||||||
mcards: "697a15cc72e95c92d4c5db01"
|
|
||||||
|
|
||||||
# Gateway instances and capabilities are sourced from service discovery.
|
# Gateway instances and capabilities are sourced from service discovery.
|
||||||
|
|||||||
@@ -38,15 +38,10 @@ messaging:
|
|||||||
# Retain quote records after expiry to allow long-running payments to complete.
|
# Retain quote records after expiry to allow long-running payments to complete.
|
||||||
quote_retention_hours: 72
|
quote_retention_hours: 72
|
||||||
|
|
||||||
max_fx_quote_ttl_ms: 600000
|
|
||||||
|
|
||||||
# Service endpoints are sourced from discovery; no static overrides.
|
# Service endpoints are sourced from discovery; no static overrides.
|
||||||
card_gateways:
|
card_gateways:
|
||||||
mcards:
|
mcards:
|
||||||
funding_address: "TGBDXEg9rxSqGFJDcb889zqTjDwx1bmLRF"
|
funding_address: "TGBDXEg9rxSqGFJDcb889zqTjDwx1bmLRF"
|
||||||
fee_wallet_ref: "694c124ed76f9f811ac57133"
|
fee_wallet_ref: "694c124ed76f9f811ac57133"
|
||||||
|
|
||||||
fee_ledger_accounts:
|
|
||||||
mcards: "ledger:fees:monetix"
|
|
||||||
|
|
||||||
# Gateway instances and capabilities are sourced from service discovery.
|
# Gateway instances and capabilities are sourced from service discovery.
|
||||||
|
|||||||
@@ -27,22 +27,6 @@ func buildCardGatewayRoutes(src map[string]cardGatewayRouteConfig) map[string]or
|
|||||||
return result
|
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 {
|
func buildGatewayRegistry(logger mlogger.Logger, src []gatewayInstanceConfig, registry *discovery.Registry) orchestrator.GatewayRegistry {
|
||||||
if logger != nil {
|
if logger != nil {
|
||||||
logger = logger.Named("gateway_registry")
|
logger = logger.Named("gateway_registry")
|
||||||
|
|||||||
@@ -13,24 +13,9 @@ import (
|
|||||||
|
|
||||||
type config struct {
|
type config struct {
|
||||||
*grpcapp.Config `yaml:",inline"`
|
*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"`
|
CardGateways map[string]cardGatewayRouteConfig `yaml:"card_gateways"`
|
||||||
FeeAccounts map[string]string `yaml:"fee_ledger_accounts"`
|
|
||||||
GatewayInstances []gatewayInstanceConfig `yaml:"gateway_instances"`
|
GatewayInstances []gatewayInstanceConfig `yaml:"gateway_instances"`
|
||||||
QuoteRetentionHrs int `yaml:"quote_retention_hours"`
|
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 {
|
type cardGatewayRouteConfig struct {
|
||||||
@@ -79,18 +64,6 @@ type limitsOverrideCfg struct {
|
|||||||
MaxOps int `yaml:"max_ops"`
|
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 {
|
func (c *config) quoteRetention() time.Duration {
|
||||||
if c == nil || c.QuoteRetentionHrs <= 0 {
|
if c == nil || c.QuoteRetentionHrs <= 0 {
|
||||||
return 72 * time.Hour
|
return 72 * time.Hour
|
||||||
@@ -98,13 +71,6 @@ func (c *config) quoteRetention() time.Duration {
|
|||||||
return time.Duration(c.QuoteRetentionHrs) * time.Hour
|
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) {
|
func (i *Imp) loadConfig() (*config, error) {
|
||||||
data, err := os.ReadFile(i.file)
|
data, err := os.ReadFile(i.file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user