Skip to content

Commit

Permalink
refactor: Improve purchaseIsDisabled logic in ProductService
Browse files Browse the repository at this point in the history
  • Loading branch information
PleBea committed Sep 25, 2024
1 parent 3e7269e commit 87c6ca6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/product/product.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ export class ProductService {
}))
.then((product) => ({
...product,
purchaseIsDisabled:
product.fundingEndDate < DateTime.now().toJSDate() &&
product.type === ProductType.FUNDING,
purchaseIsDisabled: !(
product.fundingEndDate < DateTime.now().toJSDate() && product.type === ProductType.FUNDING
),
}))
.then((product) => {
if (!product.userTokenBalancesOnProduct.length) return product;
Expand Down

0 comments on commit 87c6ca6

Please sign in to comment.