added token sell to bank

This commit is contained in:
Kevsl 2024-06-14 12:14:42 +02:00
parent b89065e5c6
commit 7f00cfb382

View File

@ -84,7 +84,7 @@ export class CryptoService {
const newBalance = userAsset.amount - dto.amount;
if (newBalance > 0) {
await this.prisma.userHasCrypto.update({
return this.prisma.userHasCrypto.update({
where: {
id: userAsset.id,
},
@ -93,7 +93,7 @@ export class CryptoService {
},
});
} else {
await this.prisma.userHasCrypto.delete({
return this.prisma.userHasCrypto.delete({
where: {
id: userAsset.id,
},