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

removing restriction of trusted algorithms needing to be on the same chain

This commit is contained in:
Jamie Hewitt 2022-12-08 14:22:16 +03:00
parent 0ccd375738
commit 5d629382d5
5 changed files with 3 additions and 9 deletions

View File

@ -4,7 +4,7 @@ interface EsPaginationOptions {
} }
interface BaseQueryParams { interface BaseQueryParams {
chainIds: number[] chainIds?: number[]
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
nestedQuery?: any nestedQuery?: any
esPaginationOptions?: EsPaginationOptions esPaginationOptions?: EsPaginationOptions

View File

@ -188,8 +188,8 @@ export async function getAssetsNames(
export async function getAssetsFromDids( export async function getAssetsFromDids(
didList: string[], didList: string[],
chainIds: number[], cancelToken: CancelToken,
cancelToken: CancelToken chainIds?: number[]
): Promise<Asset[]> { ): Promise<Asset[]> {
if (didList?.length === 0 || chainIds?.length === 0) return [] if (didList?.length === 0 || chainIds?.length === 0) return []

View File

@ -328,7 +328,6 @@ export async function getComputeJobs(
export async function createTrustedAlgorithmList( export async function createTrustedAlgorithmList(
selectedAlgorithms: string[], // list of DIDs, selectedAlgorithms: string[], // list of DIDs,
assetChainId: number,
cancelToken: CancelToken cancelToken: CancelToken
): Promise<PublisherTrustedAlgorithm[]> { ): Promise<PublisherTrustedAlgorithm[]> {
const trustedAlgorithms: PublisherTrustedAlgorithm[] = [] const trustedAlgorithms: PublisherTrustedAlgorithm[] = []
@ -340,7 +339,6 @@ export async function createTrustedAlgorithmList(
const selectedAssets = await getAssetsFromDids( const selectedAssets = await getAssetsFromDids(
selectedAlgorithms, selectedAlgorithms,
[assetChainId],
cancelToken cancelToken
) )
@ -369,14 +367,12 @@ export async function createTrustedAlgorithmList(
export async function transformComputeFormToServiceComputeOptions( export async function transformComputeFormToServiceComputeOptions(
values: ComputeEditForm, values: ComputeEditForm,
currentOptions: ServiceComputeOptions, currentOptions: ServiceComputeOptions,
assetChainId: number,
cancelToken: CancelToken cancelToken: CancelToken
): Promise<ServiceComputeOptions> { ): Promise<ServiceComputeOptions> {
const publisherTrustedAlgorithms = values.allowAllPublishedAlgorithms const publisherTrustedAlgorithms = values.allowAllPublishedAlgorithms
? null ? null
: await createTrustedAlgorithmList( : await createTrustedAlgorithmList(
values.publisherTrustedAlgorithms, values.publisherTrustedAlgorithms,
assetChainId,
cancelToken cancelToken
) )

View File

@ -21,7 +21,6 @@ export default function DebugEditCompute({
const privacy = await transformComputeFormToServiceComputeOptions( const privacy = await transformComputeFormToServiceComputeOptions(
values, values,
asset.services[0].compute, asset.services[0].compute,
asset.chainId,
newCancelToken() newCancelToken()
) )
setFormTransformed(privacy) setFormTransformed(privacy)

View File

@ -57,7 +57,6 @@ export default function EditComputeDataset({
await transformComputeFormToServiceComputeOptions( await transformComputeFormToServiceComputeOptions(
values, values,
asset.services[0].compute, asset.services[0].compute,
asset.chainId,
newCancelToken() newCancelToken()
) )