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:
parent
0ccd375738
commit
5d629382d5
2
src/@types/aquarius/BaseQueryParams.d.ts
vendored
2
src/@types/aquarius/BaseQueryParams.d.ts
vendored
@ -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
|
||||
|
@ -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 []
|
||||
|
||||
|
@ -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
|
||||
)
|
||||
|
||||
|
@ -21,7 +21,6 @@ export default function DebugEditCompute({
|
||||
const privacy = await transformComputeFormToServiceComputeOptions(
|
||||
values,
|
||||
asset.services[0].compute,
|
||||
asset.chainId,
|
||||
newCancelToken()
|
||||
)
|
||||
setFormTransformed(privacy)
|
||||
|
@ -57,7 +57,6 @@ export default function EditComputeDataset({
|
||||
await transformComputeFormToServiceComputeOptions(
|
||||
values,
|
||||
asset.services[0].compute,
|
||||
asset.chainId,
|
||||
newCancelToken()
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user