diff --git a/src/ocean/Assets.ts b/src/ocean/Assets.ts index 1947407b..b714487b 100644 --- a/src/ocean/Assets.ts +++ b/src/ocean/Assets.ts @@ -393,7 +393,11 @@ export class Assets extends Instantiable { return { type: 'access', index: 2, +<<<<<<< HEAD serviceEndpoint: customProvider || this.ocean.provider.url, +======= + serviceEndpoint: customProvider || this.ocean.provider.getConsumeEndpoint(), +>>>>>>> 17e61d0... allow customProvider on publish attributes: { main: { creator: creator.getId(), diff --git a/src/ocean/Compute.ts b/src/ocean/Compute.ts index 5f6eebbc..dcc1a4e9 100644 --- a/src/ocean/Compute.ts +++ b/src/ocean/Compute.ts @@ -94,7 +94,7 @@ export class Compute extends Instantiable { if (did && txId) { const provider = new Provider(this.instanceConfig) provider.setBaseUrl(serviceEndpoint) - const computeJobsList = await this.ocean.provider.compute( + const computeJobsList = await provider.compute( 'post', did, consumerAccount, @@ -293,9 +293,13 @@ export class Compute extends Instantiable { const service = { type: 'compute', index: 3, +<<<<<<< HEAD serviceEndpoint: customProvider ? customProvider + this.ocean.provider.getComputeEndpointShort() : this.ocean.provider.getComputeEndpoint(), +======= + serviceEndpoint: customProvider || this.ocean.provider.getComputeEndpoint(), +>>>>>>> 17e61d0... allow customProvider on publish attributes: { main: { name, diff --git a/src/provider/Provider.ts b/src/provider/Provider.ts index 430f3a75..a76a6c94 100644 --- a/src/provider/Provider.ts +++ b/src/provider/Provider.ts @@ -298,17 +298,24 @@ export class Provider extends Instantiable { return `${this.url}${apiPath}/download` } +<<<<<<< HEAD /** Check for a valid provider at URL * @param {String} url * @return {Promise} string */ +======= +>>>>>>> 17e61d0... allow customProvider on publish public async isValidProvider(url: string): Promise { const fetch = this.ocean.utils.fetch.get(url) await fetch .then((response: Response) => { if (response.ok) { const params = response.json() +<<<<<<< HEAD if (params['provider-address']) return true +======= + if (params) return true +>>>>>>> 17e61d0... allow customProvider on publish } return false })