mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
adding check on priceDataset
This commit is contained in:
parent
d88b4c9d5d
commit
8c88d512bf
@ -128,7 +128,7 @@ export default function FormStartCompute({
|
|||||||
selectedAlgorithmAsset?.accessDetails.price
|
selectedAlgorithmAsset?.accessDetails.price
|
||||||
)
|
)
|
||||||
const priceDataset = new Decimal(
|
const priceDataset = new Decimal(
|
||||||
hasPreviousOrder
|
hasPreviousOrder || hasDatatoken
|
||||||
? 0
|
? 0
|
||||||
: datasetOrderPriceAndFees?.price || asset.accessDetails.price
|
: datasetOrderPriceAndFees?.price || asset.accessDetails.price
|
||||||
).toDecimalPlaces(MAX_DECIMALS)
|
).toDecimalPlaces(MAX_DECIMALS)
|
||||||
@ -144,6 +144,7 @@ export default function FormStartCompute({
|
|||||||
const providerFees = providerFeeAmount
|
const providerFees = providerFeeAmount
|
||||||
? new Decimal(providerFeeAmount).toDecimalPlaces(MAX_DECIMALS)
|
? new Decimal(providerFeeAmount).toDecimalPlaces(MAX_DECIMALS)
|
||||||
: new Decimal(0)
|
: new Decimal(0)
|
||||||
|
|
||||||
const totalPrice = priceDataset
|
const totalPrice = priceDataset
|
||||||
.plus(priceAlgo)
|
.plus(priceAlgo)
|
||||||
.plus(providerFees)
|
.plus(providerFees)
|
||||||
|
Loading…
Reference in New Issue
Block a user