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