mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Revert "remove previous orders from price calculation in compute"
This reverts commit 504840a2d3
.
This commit is contained in:
parent
504840a2d3
commit
5819c25015
@ -196,7 +196,9 @@ export default function FormStartCompute({
|
||||
hasPreviousOrderSelectedComputeAsset={
|
||||
hasPreviousOrderSelectedComputeAsset
|
||||
}
|
||||
hasDatatoken={hasDatatoken}
|
||||
selectedComputeAssetTimeout={selectedComputeAssetTimeout}
|
||||
hasDatatokenSelectedComputeAsset={hasDatatokenSelectedComputeAsset}
|
||||
algorithmConsumeDetails={selectedAlgorithmAsset?.accessDetails}
|
||||
symbol={oceanSymbol}
|
||||
totalPrice={totalPrice}
|
||||
|
@ -9,9 +9,11 @@ import Decimal from 'decimal.js'
|
||||
interface PriceOutputProps {
|
||||
totalPrice: string
|
||||
hasPreviousOrder: boolean
|
||||
hasDatatoken: boolean
|
||||
symbol: string
|
||||
assetTimeout: string
|
||||
hasPreviousOrderSelectedComputeAsset: boolean
|
||||
hasDatatokenSelectedComputeAsset: boolean
|
||||
algorithmConsumeDetails: AccessDetails
|
||||
selectedComputeAssetTimeout: string
|
||||
datasetOrderPrice?: string
|
||||
@ -23,6 +25,7 @@ interface PriceOutputProps {
|
||||
function Row({
|
||||
price,
|
||||
hasPreviousOrder,
|
||||
hasDatatoken,
|
||||
symbol,
|
||||
timeout,
|
||||
sign,
|
||||
@ -30,6 +33,7 @@ function Row({
|
||||
}: {
|
||||
price: string
|
||||
hasPreviousOrder?: boolean
|
||||
hasDatatoken?: boolean
|
||||
symbol?: string
|
||||
timeout?: string
|
||||
sign?: string
|
||||
@ -41,7 +45,7 @@ function Row({
|
||||
<div className={styles.type}>{type}</div>
|
||||
<div>
|
||||
<PriceUnit
|
||||
price={Number(price)}
|
||||
price={hasPreviousOrder || hasDatatoken ? 0 : Number(price)}
|
||||
symbol={symbol}
|
||||
size="small"
|
||||
className={styles.price}
|
||||
@ -60,9 +64,11 @@ function Row({
|
||||
export default function PriceOutput({
|
||||
totalPrice,
|
||||
hasPreviousOrder,
|
||||
hasDatatoken,
|
||||
assetTimeout,
|
||||
symbol,
|
||||
hasPreviousOrderSelectedComputeAsset,
|
||||
hasDatatokenSelectedComputeAsset,
|
||||
algorithmConsumeDetails,
|
||||
selectedComputeAssetTimeout,
|
||||
datasetOrderPrice,
|
||||
@ -81,6 +87,7 @@ export default function PriceOutput({
|
||||
<div className={styles.calculation}>
|
||||
<Row
|
||||
hasPreviousOrder={hasPreviousOrder}
|
||||
hasDatatoken={hasDatatoken}
|
||||
price={new Decimal(
|
||||
datasetOrderPrice || asset?.accessDetails?.price || 0
|
||||
)
|
||||
@ -92,6 +99,7 @@ export default function PriceOutput({
|
||||
/>
|
||||
<Row
|
||||
hasPreviousOrder={hasPreviousOrderSelectedComputeAsset}
|
||||
hasDatatoken={hasDatatokenSelectedComputeAsset}
|
||||
price={new Decimal(
|
||||
algoOrderPrice || algorithmConsumeDetails?.price || 0
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user