From 8c88d512bf2c7ef5c09c5f886439d961e43edc10 Mon Sep 17 00:00:00 2001 From: EnzoVezzaro Date: Thu, 20 Oct 2022 08:17:52 -0400 Subject: [PATCH] adding check on priceDataset --- .../Asset/AssetActions/Compute/FormComputeDataset.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx b/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx index d5a523cc3..6e8d43ec3 100644 --- a/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx +++ b/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx @@ -128,7 +128,7 @@ export default function FormStartCompute({ selectedAlgorithmAsset?.accessDetails.price ) const priceDataset = new Decimal( - hasPreviousOrder + hasPreviousOrder || hasDatatoken ? 0 : datasetOrderPriceAndFees?.price || asset.accessDetails.price ).toDecimalPlaces(MAX_DECIMALS) @@ -144,6 +144,7 @@ export default function FormStartCompute({ const providerFees = providerFeeAmount ? new Decimal(providerFeeAmount).toDecimalPlaces(MAX_DECIMALS) : new Decimal(0) + const totalPrice = priceDataset .plus(priceAlgo) .plus(providerFees)