add bitcoin shop config and payment method enablement

This commit is contained in:
2026-09-03 01:00:07 +02:00
parent a7282a1888
commit 11c94c7834
16 changed files with 170 additions and 4 deletions
+6 -1
View File
@@ -17,6 +17,7 @@ import { NodeEnv } from '../types/NodeEnv';
import { ShopFiatCurrency } from '../types/ShopFiatCurrency';
import { PaymentMethod } from '../modules/payment/types/PaymentMethod';
import { SimplexConfig } from '../types/SimplexConfig';
import { parseEnabledPaymentMethods } from '../utils/payment/parseEnabledPaymentMethods';
const env = (key: string): string => process.env[key] || '';
@@ -177,8 +178,12 @@ export const getEncryptionConfig = (): EncryptionConfig => ({
export const getShopSettingsConfig = (): ShopSettingsConfig => ({
shopName: env('SHOP_NAME'),
shopFiatCurrency: env('SHOP_FIAT_CURRENCY') as ShopFiatCurrency,
enabledPaymentMethods: parseEnabledPaymentMethods(env('PAYMENT_METHODS_ENABLED')),
monero: {
confirmationTiers: JSON.parse(env('MONERO_CONFIRMATION_TIERS')) as ConfirmationTier[]
},
bitcoin: {
confirmationTiers: JSON.parse(env('BITCOIN_CONFIRMATION_TIERS')) as ConfirmationTier[]
}
});
@@ -192,7 +197,7 @@ export const getOrderConfig = (): OrderConfig => ({
export const getInvoiceConfig = (): InvoiceConfig => ({
minByMethod: {
[PaymentMethod.Xmr]: String(envInt('MONERO_MIN_INCOMING_ATOMIC')),
[PaymentMethod.Btc]: String(envInt('BTC_MIN_INCOMING_ATOMIC'))
[PaymentMethod.Btc]: String(envInt('BITCOIN_MIN_INCOMING_ATOMIC'))
}
});