From 67eb989f369fe34ebbb7c60b406c23ad662442fa Mon Sep 17 00:00:00 2001 From: SeungGwa123 Date: Thu, 21 Nov 2024 20:54:54 +0900 Subject: [PATCH] fix: ask error fix --- packages/server/src/trade/trade-ask.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/trade/trade-ask.service.ts b/packages/server/src/trade/trade-ask.service.ts index eaa420a2..3edffeb9 100644 --- a/packages/server/src/trade/trade-ask.service.ts +++ b/packages/server/src/trade/trade-ask.service.ts @@ -74,7 +74,7 @@ export class AskService implements OnModuleInit { }) }else{ userAsset.quantity = assetBalance - userAsset.price -= Math.floor(askDto.receivedPrice + askDto.receivedAmount) + userAsset.price -= askDto.receivedPrice.toFixed(8) * askDto.receivedAmount.toFixed(8) this.assetRepository.updateAssetPrice(userAsset, queryRunner); } await this.tradeRepository.createTrade(askDto, user.userId,'sell', queryRunner);