refactor xmr rate module to exchange rate module for multi crypto support

This commit is contained in:
2026-09-02 14:53:50 +02:00
parent 6818f08dbe
commit 0510695598
29 changed files with 630 additions and 388 deletions
@@ -0,0 +1,7 @@
import type { ExchangeRatePaymentMethod } from './exchangeRatePaymentMethods';
import { PaymentMethod } from '../../payment/types/PaymentMethod';
export const COINPAPRIKA_ID_BY_PAYMENT_METHOD = {
[PaymentMethod.Xmr]: 'xmr-monero',
[PaymentMethod.Btc]: 'btc-bitcoin'
} as const satisfies Record<ExchangeRatePaymentMethod, string>;
@@ -0,0 +1,7 @@
import type { ExchangeRatePaymentMethod } from './exchangeRatePaymentMethods';
import { PaymentMethod } from '../../payment/types/PaymentMethod';
export const COINGECKO_ID_BY_PAYMENT_METHOD = {
[PaymentMethod.Xmr]: 'monero',
[PaymentMethod.Btc]: 'bitcoin'
} as const satisfies Record<ExchangeRatePaymentMethod, string>;
@@ -0,0 +1,5 @@
import { PaymentMethod } from '../../payment/types/PaymentMethod';
export const EXCHANGE_RATE_PAYMENT_METHODS = [PaymentMethod.Xmr, PaymentMethod.Btc] as const;
export type ExchangeRatePaymentMethod = (typeof EXCHANGE_RATE_PAYMENT_METHODS)[number];