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
|
||||
|
||||
const query = generateBaseQuery(baseParams)
|
||||
console.log('query', query)
|
||||
|
||||
return query
|
||||
}
|
||||
@ -166,27 +165,16 @@ export async function getAlgorithmsForAsset(
|
||||
const computeService: Service = getServiceByName(asset, 'compute')
|
||||
const publisherTrustedAlgorithms =
|
||||
computeService.compute.publisherTrustedAlgorithms || []
|
||||
console.log('asset', asset)
|
||||
console.log('computeService', computeService)
|
||||
|
||||
let algorithms: Asset[]
|
||||
if (
|
||||
!computeService.compute
|
||||
// !computeService.compute.publisherTrustedAlgorithms ||
|
||||
// computeService.compute.publisherTrustedAlgorithms.length === 0
|
||||
) {
|
||||
if (!computeService.compute) {
|
||||
algorithms = []
|
||||
} else {
|
||||
console.log(
|
||||
'computeService.compute.publisherTrustedAlgorithms',
|
||||
publisherTrustedAlgorithms
|
||||
)
|
||||
const gueryResults = await queryMetadata(
|
||||
getQuerryString(publisherTrustedAlgorithms, asset.chainId),
|
||||
token
|
||||
)
|
||||
algorithms = gueryResults?.results
|
||||
console.log('algorithms', algorithms)
|
||||
}
|
||||
return algorithms
|
||||
}
|
||||
@ -426,7 +414,7 @@ export async function transformComputeFormToServiceComputeOptions(
|
||||
cancelToken: CancelToken
|
||||
): Promise<ServiceComputeOptions> {
|
||||
const publisherTrustedAlgorithms = values.allowAllPublishedAlgorithms
|
||||
? []
|
||||
? null
|
||||
: await createTrustedAlgorithmList(
|
||||
values.publisherTrustedAlgorithms,
|
||||
assetChainId,
|
||||
|
Loading…
Reference in New Issue
Block a user