implement exchange settings management and fallback rate handling

This commit is contained in:
Marshal
2026-08-04 11:22:47 +00:00
parent 7c78a815eb
commit 56697d8fc5
22 changed files with 805 additions and 85 deletions

View File

@@ -1,8 +1,7 @@
import { Module, forwardRef } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { ExchangeModule, ExchangeOptions } from '@edr/api-common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { registerExchangeModule } from '../exchange-settings/exchange-module-options';
import { BillingModule } from '../billing/billing.module';
import { DocumentsModule } from '../billing/documents/documents.module';
import { FilesModule } from '../files/files.module';
@@ -78,11 +77,7 @@ import { WarehousesService } from './warehouses.service';
NotificationsModule,
NotificationInboxModule,
SignaturesModule,
ExchangeModule.forRootAsync({
inject: [ConfigService],
useFactory: (config: ConfigService): ExchangeOptions =>
config.get<ExchangeOptions>('app.cbeExchange') ?? {},
}),
registerExchangeModule(),
],
controllers: [
WarehousesController,