add bitcoin withdraw max fee validation config

This commit is contained in:
2026-09-07 01:35:57 +02:00
parent 6c894d58ba
commit 626f2ea4f0
9 changed files with 23 additions and 3 deletions
@@ -1,7 +1,12 @@
import { Transform } from 'class-transformer';
import { IsInt, IsNotEmpty, IsString, Max, Min } from 'class-validator';
import { getAppConfig } from '../../../config';
import { IsBitcoinAddress } from '../../../validation/decorators/isBitcoinAddress';
const {
validation: { bitcoinWithdrawMaxFeeRateSatVbyte }
} = getAppConfig();
export class BitcoinWalletWithdrawDto {
@Transform(({ value }: { value: unknown }) => (typeof value === 'string' ? value.trim() : value))
@IsString()
@@ -11,7 +16,7 @@ export class BitcoinWalletWithdrawDto {
@IsInt()
@Min(1)
@Max(100)
@Max(bitcoinWithdrawMaxFeeRateSatVbyte)
feeRateSatVbyte: number;
@IsString()