add coinpaprika config

This commit is contained in:
2026-09-01 16:51:26 +02:00
parent 93182aed75
commit 6818f08dbe
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -82,8 +82,8 @@ SIGNED_COOKIE_THEME_EXPIRES_IN_MS=31536000000 # 365 days
COINGECKO_API_BASE_URL=https://api.coingecko.com/api/v3 COINGECKO_API_BASE_URL=https://api.coingecko.com/api/v3
COINGECKO_RATE_FETCH_TIMEOUT_MS=5000 COINGECKO_RATE_FETCH_TIMEOUT_MS=5000
KRAKEN_API_BASE_URL=https://api.kraken.com/0/public COINPAPRIKA_API_BASE_URL=https://api.coinpaprika.com/v1
KRAKEN_RATE_FETCH_TIMEOUT_MS=5000 COINPAPRIKA_RATE_FETCH_TIMEOUT_MS=5000
BASE64_ENCRYPTION_KEY="nyRya1KpYSQ+drpO132mkOEMUR+uq6K7tWvpMfppIME=" # Generate with: openssl rand -base64 32 BASE64_ENCRYPTION_KEY="nyRya1KpYSQ+drpO132mkOEMUR+uq6K7tWvpMfppIME=" # Generate with: openssl rand -base64 32
+5 -5
View File
@@ -4,7 +4,7 @@ import {
EncryptionConfig, EncryptionConfig,
InvoiceConfig, InvoiceConfig,
JwtConfig, JwtConfig,
KrakenConfig, CoinPaprikaConfig,
MulterConfig, MulterConfig,
OrderConfig, OrderConfig,
PostgresConfig, PostgresConfig,
@@ -163,10 +163,10 @@ export const getCoingeckoConfig = (): CoingeckoConfig => {
}; };
}; };
export const getKrakenConfig = (): KrakenConfig => { export const getCoinPaprikaConfig = (): CoinPaprikaConfig => {
return { return {
apiBaseUrl: env('KRAKEN_API_BASE_URL'), apiBaseUrl: env('COINPAPRIKA_API_BASE_URL'),
rateFetchTimeoutMs: envInt('KRAKEN_RATE_FETCH_TIMEOUT_MS') rateFetchTimeoutMs: envInt('COINPAPRIKA_RATE_FETCH_TIMEOUT_MS')
}; };
}; };
@@ -214,7 +214,7 @@ export default () => ({
app: getAppConfig(), app: getAppConfig(),
jwt: getJwtConfig(), jwt: getJwtConfig(),
coingecko: getCoingeckoConfig(), coingecko: getCoingeckoConfig(),
kraken: getKrakenConfig(), coinPaprika: getCoinPaprikaConfig(),
encryption: getEncryptionConfig(), encryption: getEncryptionConfig(),
shopSettings: getShopSettingsConfig(), shopSettings: getShopSettingsConfig(),
order: getOrderConfig(), order: getOrderConfig(),
+2 -2
View File
@@ -246,12 +246,12 @@ class EnvironmentVariables {
@IsNotEmpty() @IsNotEmpty()
@IsString() @IsString()
KRAKEN_API_BASE_URL: string; COINPAPRIKA_API_BASE_URL: string;
@IsNotEmpty() @IsNotEmpty()
@IsNumber() @IsNumber()
@Min(1) @Min(1)
KRAKEN_RATE_FETCH_TIMEOUT_MS: number; COINPAPRIKA_RATE_FETCH_TIMEOUT_MS: number;
@IsNotEmpty() @IsNotEmpty()
@IsNumber() @IsNumber()
+2 -2
View File
@@ -87,7 +87,7 @@ export interface CoingeckoConfig {
rateFetchTimeoutMs: number; rateFetchTimeoutMs: number;
} }
export interface KrakenConfig { export interface CoinPaprikaConfig {
apiBaseUrl: string; apiBaseUrl: string;
rateFetchTimeoutMs: number; rateFetchTimeoutMs: number;
} }
@@ -112,7 +112,7 @@ export interface Config {
postgres: PostgresConfig; postgres: PostgresConfig;
jwt: JwtConfig; jwt: JwtConfig;
coingecko: CoingeckoConfig; coingecko: CoingeckoConfig;
kraken: KrakenConfig; coinPaprika: CoinPaprikaConfig;
encryption: EncryptionConfig; encryption: EncryptionConfig;
shopSettings: ShopSettingsConfig; shopSettings: ShopSettingsConfig;
order: OrderConfig; order: OrderConfig;