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) }