From 2fb9fb2c631c97f07fd28a898c05ec85e6e6f0c2 Mon Sep 17 00:00:00 2001 From: EnzoVezzaro Date: Wed, 19 Oct 2022 10:00:23 -0400 Subject: [PATCH] fix total sum order on compute --- .../Asset/AssetActions/Compute/FormComputeDataset.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx b/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx index 0a5a2a0fb..d5a523cc3 100644 --- a/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx +++ b/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx @@ -128,7 +128,9 @@ export default function FormStartCompute({ selectedAlgorithmAsset?.accessDetails.price ) const priceDataset = new Decimal( - datasetOrderPriceAndFees?.price || asset.accessDetails.price + hasPreviousOrder + ? 0 + : datasetOrderPriceAndFees?.price || asset.accessDetails.price ).toDecimalPlaces(MAX_DECIMALS) const priceAlgo = @@ -138,6 +140,7 @@ export default function FormStartCompute({ algoOrderPriceAndFees?.price || selectedAlgorithmAsset.accessDetails.price ).toDecimalPlaces(MAX_DECIMALS) + const providerFees = providerFeeAmount ? new Decimal(providerFeeAmount).toDecimalPlaces(MAX_DECIMALS) : new Decimal(0)