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:
parent
56f5e77c49
commit
124fd1d137
@ -291,7 +291,7 @@ export async function getAlgorithmDatasetsForCompute(
|
||||
must: {
|
||||
match: {
|
||||
'services.compute.publisherTrustedAlgorithms.did': {
|
||||
query: escapeEsReservedCharacters(algorithmId)
|
||||
query: algorithmId
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -304,7 +304,6 @@ export async function getAlgorithmDatasetsForCompute(
|
||||
|
||||
const query = generateBaseQuery(baseQueryParams)
|
||||
const computeDatasets = await queryMetadata(query, cancelToken)
|
||||
|
||||
if (computeDatasets?.totalResults === 0) return []
|
||||
|
||||
const datasets = await transformAssetToAssetSelection(
|
||||
|
@ -14,11 +14,12 @@ export async function transformAssetToAssetSelection(
|
||||
const algorithmList: AssetSelectionAsset[] = []
|
||||
|
||||
for (const asset of extendedAssets) {
|
||||
const algoComputeService = getServiceByName(asset, 'compute')
|
||||
const algoService =
|
||||
getServiceByName(asset, 'compute') || getServiceByName(asset, 'access')
|
||||
|
||||
if (
|
||||
asset?.accessDetails?.price &&
|
||||
algoComputeService?.serviceEndpoint === datasetProviderEndpoint
|
||||
algoService?.serviceEndpoint === datasetProviderEndpoint
|
||||
) {
|
||||
let selected = false
|
||||
selectedAlgorithms?.forEach((algorithm: PublisherTrustedAlgorithm) => {
|
||||
|
@ -2,7 +2,6 @@
|
||||
width: auto;
|
||||
margin-bottom: calc(var(--spacer) / 2);
|
||||
margin-top: -1rem;
|
||||
margin-left: -2rem;
|
||||
}
|
||||
|
||||
.info {
|
||||
|
Loading…
Reference in New Issue
Block a user