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 {
chainIds: number[]
chainIds?: number[]
// eslint-disable-next-line @typescript-eslint/no-explicit-any
nestedQuery?: any
esPaginationOptions?: EsPaginationOptions

View File

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

View File

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

View File

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

View File

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