From 03e1a6e9c40951f4787eb3f7e7124dbcc47e4341 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 19 Feb 2026 12:10:23 -0800 Subject: [PATCH] fix: allow ETH pricing mode for membership quotes --- backend/secretapi/config.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/backend/secretapi/config.go b/backend/secretapi/config.go index 6dbebde..8b2ace4 100644 --- a/backend/secretapi/config.go +++ b/backend/secretapi/config.go @@ -77,11 +77,18 @@ func (c Config) Validate() error { if c.ChainID <= 0 { return fmt.Errorf("SECRET_API_CHAIN_ID must be positive") } - if strings.ToUpper(strings.TrimSpace(c.MintCurrency)) != "USDC" { - return fmt.Errorf("SECRET_API_MINT_CURRENCY must be USDC") - } - if c.MintDecimals != 6 { - return fmt.Errorf("SECRET_API_MINT_DECIMALS must be 6") + currency := strings.ToUpper(strings.TrimSpace(c.MintCurrency)) + switch currency { + case "USDC": + if c.MintDecimals != 6 { + return fmt.Errorf("SECRET_API_MINT_DECIMALS must be 6 for USDC") + } + case "ETH": + if c.MintDecimals != 18 { + return fmt.Errorf("SECRET_API_MINT_DECIMALS must be 18 for ETH") + } + default: + return fmt.Errorf("SECRET_API_MINT_CURRENCY must be USDC or ETH") } amountRaw := strings.TrimSpace(c.MintAmountAtomic) amount, ok := new(big.Int).SetString(amountRaw, 10)