fixed offers creation

This commit is contained in:
Kevsl
2024-06-19 13:49:37 +02:00
parent 4a32d2b07a
commit 49c98caff0
3 changed files with 43 additions and 7 deletions

View File

@@ -52,6 +52,7 @@ export class OfferService {
currentUserOffers.forEach((offer) => {
totalAmountsInOffers += offer.amount;
});
if (totalAmountsInOffers > userAssets.amount) {
throw new ForbiddenException('Insuficient tokens avaiblable');
}