mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
use compute env and compute consumer address
This commit is contained in:
parent
5790ffd122
commit
b50c46e1f4
@ -45,7 +45,6 @@ import {
|
|||||||
getAlgorithmsForAsset,
|
getAlgorithmsForAsset,
|
||||||
getQuerryString,
|
getQuerryString,
|
||||||
getValidUntilTime,
|
getValidUntilTime,
|
||||||
getComputeEnviromen,
|
|
||||||
getComputeEnviroment
|
getComputeEnviroment
|
||||||
} from '@utils/compute'
|
} from '@utils/compute'
|
||||||
import AssetSelection, {
|
import AssetSelection, {
|
||||||
@ -266,6 +265,9 @@ export default function Compute({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const validUntil = getValidUntilTime()
|
||||||
|
const computeEnv = await getComputeEnviroment(asset)
|
||||||
|
|
||||||
if (!isOwned) {
|
if (!isOwned) {
|
||||||
try {
|
try {
|
||||||
if (!hasDatatoken && asset?.accessDetails.type === 'dynamic') {
|
if (!hasDatatoken && asset?.accessDetails.type === 'dynamic') {
|
||||||
@ -282,7 +284,15 @@ export default function Compute({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LoggerInstance.log('dataset orderPriceAndFees: ', orderPriceAndFees)
|
LoggerInstance.log('dataset orderPriceAndFees: ', orderPriceAndFees)
|
||||||
const orderTx = await order(web3, asset, orderPriceAndFees, accountId)
|
const orderTx = await order(
|
||||||
|
web3,
|
||||||
|
asset,
|
||||||
|
orderPriceAndFees,
|
||||||
|
accountId,
|
||||||
|
computeEnv.id,
|
||||||
|
validUntil,
|
||||||
|
computeEnv.consumerAddress
|
||||||
|
)
|
||||||
LoggerInstance.log(
|
LoggerInstance.log(
|
||||||
'[compute] Order dataset: ',
|
'[compute] Order dataset: ',
|
||||||
orderTx.transactionHash
|
orderTx.transactionHash
|
||||||
@ -322,7 +332,10 @@ export default function Compute({
|
|||||||
web3,
|
web3,
|
||||||
selectedAlgorithmAsset,
|
selectedAlgorithmAsset,
|
||||||
orderAlgorithmPriceAndFees,
|
orderAlgorithmPriceAndFees,
|
||||||
accountId
|
accountId,
|
||||||
|
computeEnv.id,
|
||||||
|
validUntil,
|
||||||
|
computeEnv.consumerAddress
|
||||||
)
|
)
|
||||||
|
|
||||||
LoggerInstance.log(
|
LoggerInstance.log(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user