From 411b3fddafde9a7dad28bf40967053f11fa5e351 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Sun, 19 Apr 2026 10:41:53 +0330 Subject: [PATCH] fix --- src/modules/wallets/providers/wallets.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wallets/providers/wallets.service.ts b/src/modules/wallets/providers/wallets.service.ts index 5a577b8..4cf5d38 100755 --- a/src/modules/wallets/providers/wallets.service.ts +++ b/src/modules/wallets/providers/wallets.service.ts @@ -262,7 +262,7 @@ export class WalletsService { const wallet = await queryRunner.manager.findOne(Wallet, { where: { user: { id: userId } }, lock: { mode: "pessimistic_write" } }); if (!wallet) throw new BadRequestException(WalletMessage.WALLET_NOT_FOUND); - if (wallet.balance.lessThan(amount)) { + if (new Decimal(wallet.balance).lessThan(amount)) { throw new BadRequestException(WalletMessage.BALANCE_IS_NOT_ENOUGH) }