add bitcoin shop config and payment method enablement
This commit is contained in:
@@ -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'))
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user