mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
fix edit compute settings
This commit is contained in:
parent
2c05e1f945
commit
fcc1e440fd
@ -154,7 +154,6 @@ export function getQuerryString(
|
|||||||
} as BaseQueryParams
|
} as BaseQueryParams
|
||||||
|
|
||||||
const query = generateBaseQuery(baseParams)
|
const query = generateBaseQuery(baseParams)
|
||||||
console.log('query', query)
|
|
||||||
|
|
||||||
return query
|
return query
|
||||||
}
|
}
|
||||||
@ -166,27 +165,16 @@ export async function getAlgorithmsForAsset(
|
|||||||
const computeService: Service = getServiceByName(asset, 'compute')
|
const computeService: Service = getServiceByName(asset, 'compute')
|
||||||
const publisherTrustedAlgorithms =
|
const publisherTrustedAlgorithms =
|
||||||
computeService.compute.publisherTrustedAlgorithms || []
|
computeService.compute.publisherTrustedAlgorithms || []
|
||||||
console.log('asset', asset)
|
|
||||||
console.log('computeService', computeService)
|
|
||||||
|
|
||||||
let algorithms: Asset[]
|
let algorithms: Asset[]
|
||||||
if (
|
if (!computeService.compute) {
|
||||||
!computeService.compute
|
|
||||||
// !computeService.compute.publisherTrustedAlgorithms ||
|
|
||||||
// computeService.compute.publisherTrustedAlgorithms.length === 0
|
|
||||||
) {
|
|
||||||
algorithms = []
|
algorithms = []
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
|
||||||
'computeService.compute.publisherTrustedAlgorithms',
|
|
||||||
publisherTrustedAlgorithms
|
|
||||||
)
|
|
||||||
const gueryResults = await queryMetadata(
|
const gueryResults = await queryMetadata(
|
||||||
getQuerryString(publisherTrustedAlgorithms, asset.chainId),
|
getQuerryString(publisherTrustedAlgorithms, asset.chainId),
|
||||||
token
|
token
|
||||||
)
|
)
|
||||||
algorithms = gueryResults?.results
|
algorithms = gueryResults?.results
|
||||||
console.log('algorithms', algorithms)
|
|
||||||
}
|
}
|
||||||
return algorithms
|
return algorithms
|
||||||
}
|
}
|
||||||
@ -426,7 +414,7 @@ export async function transformComputeFormToServiceComputeOptions(
|
|||||||
cancelToken: CancelToken
|
cancelToken: CancelToken
|
||||||
): Promise<ServiceComputeOptions> {
|
): Promise<ServiceComputeOptions> {
|
||||||
const publisherTrustedAlgorithms = values.allowAllPublishedAlgorithms
|
const publisherTrustedAlgorithms = values.allowAllPublishedAlgorithms
|
||||||
? []
|
? null
|
||||||
: await createTrustedAlgorithmList(
|
: await createTrustedAlgorithmList(
|
||||||
values.publisherTrustedAlgorithms,
|
values.publisherTrustedAlgorithms,
|
||||||
assetChainId,
|
assetChainId,
|
||||||
|
Loading…
Reference in New Issue
Block a user