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

Fix compute asset selection lists (#1773)

* fix compute asset selction lists

* Update src/@utils/assetConvertor.ts

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>

* use propper const

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
This commit is contained in:
Bogdan Fazakas 2022-11-07 14:07:42 +02:00 committed by GitHub
parent 56f5e77c49
commit 124fd1d137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -291,7 +291,7 @@ export async function getAlgorithmDatasetsForCompute(
must: { must: {
match: { match: {
'services.compute.publisherTrustedAlgorithms.did': { 'services.compute.publisherTrustedAlgorithms.did': {
query: escapeEsReservedCharacters(algorithmId) query: algorithmId
} }
} }
} }
@ -304,7 +304,6 @@ export async function getAlgorithmDatasetsForCompute(
const query = generateBaseQuery(baseQueryParams) const query = generateBaseQuery(baseQueryParams)
const computeDatasets = await queryMetadata(query, cancelToken) const computeDatasets = await queryMetadata(query, cancelToken)
if (computeDatasets?.totalResults === 0) return [] if (computeDatasets?.totalResults === 0) return []
const datasets = await transformAssetToAssetSelection( const datasets = await transformAssetToAssetSelection(

View File

@ -14,11 +14,12 @@ export async function transformAssetToAssetSelection(
const algorithmList: AssetSelectionAsset[] = [] const algorithmList: AssetSelectionAsset[] = []
for (const asset of extendedAssets) { for (const asset of extendedAssets) {
const algoComputeService = getServiceByName(asset, 'compute') const algoService =
getServiceByName(asset, 'compute') || getServiceByName(asset, 'access')
if ( if (
asset?.accessDetails?.price && asset?.accessDetails?.price &&
algoComputeService?.serviceEndpoint === datasetProviderEndpoint algoService?.serviceEndpoint === datasetProviderEndpoint
) { ) {
let selected = false let selected = false
selectedAlgorithms?.forEach((algorithm: PublisherTrustedAlgorithm) => { selectedAlgorithms?.forEach((algorithm: PublisherTrustedAlgorithm) => {

View File

@ -2,7 +2,6 @@
width: auto; width: auto;
margin-bottom: calc(var(--spacer) / 2); margin-bottom: calc(var(--spacer) / 2);
margin-top: -1rem; margin-top: -1rem;
margin-left: -2rem;
} }
.info { .info {