mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2026-02-06 10:36:12 +01:00
fixed offers creation
This commit is contained in:
@@ -52,6 +52,7 @@ export class OfferService {
|
||||
currentUserOffers.forEach((offer) => {
|
||||
totalAmountsInOffers += offer.amount;
|
||||
});
|
||||
|
||||
if (totalAmountsInOffers > userAssets.amount) {
|
||||
throw new ForbiddenException('Insuficient tokens avaiblable');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user