1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

change compute assets order calls order and add a default checksum for algo

This commit is contained in:
Bogdan Fazakas 2022-07-01 11:12:51 +03:00
parent daf15a698f
commit b49ba6fa45
2 changed files with 25 additions and 25 deletions

View File

@ -316,30 +316,6 @@ export default function Compute({
'Data set is not orderable in combination with selected algorithm.' 'Data set is not orderable in combination with selected algorithm.'
) )
setComputeStatusText(
getComputeFeedback(
asset.accessDetails.baseToken?.symbol,
asset.accessDetails.datatoken?.symbol,
asset.metadata.type
)[
asset.accessDetails?.type === 'fixed'
? 2
: asset.accessDetails?.type === 'dynamic'
? 1
: 3
]
)
const datasetOrderTx = await handleComputeOrder(
web3,
asset,
datasetOrderPriceAndFees,
accountId,
hasDatatoken,
initializedProviderResponse.datasets[0],
computeEnv.consumerAddress
)
if (!datasetOrderTx) throw new Error('Failed to order dataset.')
setComputeStatusText( setComputeStatusText(
getComputeFeedback( getComputeFeedback(
selectedAlgorithmAsset.accessDetails.baseToken?.symbol, selectedAlgorithmAsset.accessDetails.baseToken?.symbol,
@ -365,6 +341,30 @@ export default function Compute({
) )
if (!algorithmOrderTx) throw new Error('Failed to order algorithm.') if (!algorithmOrderTx) throw new Error('Failed to order algorithm.')
setComputeStatusText(
getComputeFeedback(
asset.accessDetails.baseToken?.symbol,
asset.accessDetails.datatoken?.symbol,
asset.metadata.type
)[
asset.accessDetails?.type === 'fixed'
? 2
: asset.accessDetails?.type === 'dynamic'
? 1
: 3
]
)
const datasetOrderTx = await handleComputeOrder(
web3,
asset,
datasetOrderPriceAndFees,
accountId,
hasDatatoken,
initializedProviderResponse.datasets[0],
computeEnv.consumerAddress
)
if (!datasetOrderTx) throw new Error('Failed to order dataset.')
LoggerInstance.log('[compute] Starting compute job.') LoggerInstance.log('[compute] Starting compute job.')
const computeAsset: ComputeAsset = { const computeAsset: ComputeAsset = {
documentId: asset.id, documentId: asset.id,

View File

@ -109,7 +109,7 @@ export const algorithmContainerPresets: MetadataAlgorithmContainer[] = [
image: 'node', image: 'node',
tag: 'latest', tag: 'latest',
entrypoint: 'node $ALGO', entrypoint: 'node $ALGO',
checksum: '' // TODO: how to get? Most likely needs to be fetched from DockerHub. checksum: '7fc268f502935d11ff50c54e3776dda76477648d5d83c2e3c4fdab744390ecf2' // TODO: how to get? Most likely needs to be fetched from DockerHub.
}, },
{ {
image: 'python', image: 'python',