mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Added normalize url function to check the endpoint (#2000)
This commit is contained in:
parent
a2ce8e4ae2
commit
ef5b236482
@ -1,6 +1,7 @@
|
||||
import { PublisherTrustedAlgorithm, Asset } from '@oceanprotocol/lib'
|
||||
import { AssetSelectionAsset } from '@shared/FormInput/InputElement/AssetSelection'
|
||||
import { getServiceByName } from './ddo'
|
||||
import normalizeUrl from 'normalize-url'
|
||||
|
||||
export async function transformAssetToAssetSelection(
|
||||
datasetProviderEndpoint: string,
|
||||
@ -15,7 +16,8 @@ export async function transformAssetToAssetSelection(
|
||||
|
||||
if (
|
||||
asset?.stats?.price?.value >= 0 &&
|
||||
algoService?.serviceEndpoint === datasetProviderEndpoint
|
||||
normalizeUrl(algoService?.serviceEndpoint) ===
|
||||
normalizeUrl(datasetProviderEndpoint)
|
||||
) {
|
||||
let selected = false
|
||||
selectedAlgorithms?.forEach((algorithm: PublisherTrustedAlgorithm) => {
|
||||
|
Loading…
Reference in New Issue
Block a user