diff --git a/src/ocean/Assets.ts b/src/ocean/Assets.ts index 9f490d55..e0e53268 100644 --- a/src/ocean/Assets.ts +++ b/src/ocean/Assets.ts @@ -384,7 +384,9 @@ export class Assets extends Instantiable { return { type: 'access', index: 2, - serviceEndpoint: customProvider || this.ocean.provider.getConsumeEndpoint(), + serviceEndpoint: customProvider + ? customProvider + this.ocean.provider.getConsumeEndpointShort() + : this.ocean.provider.getConsumeEndpoint(), attributes: { main: { creator: creator.getId(), diff --git a/src/ocean/Compute.ts b/src/ocean/Compute.ts index d0980fa5..29267462 100644 --- a/src/ocean/Compute.ts +++ b/src/ocean/Compute.ts @@ -287,7 +287,9 @@ export class Compute extends Instantiable { const service = { type: 'compute', index: 3, - serviceEndpoint: customProvider || this.ocean.provider.getComputeEndpoint(), + serviceEndpoint: customProvider + ? customProvider + this.ocean.provider.getComputeEndpointShort() + : this.ocean.provider.getComputeEndpoint(), attributes: { main: { name, diff --git a/src/provider/Provider.ts b/src/provider/Provider.ts index 470cd2e0..8489b9bb 100644 --- a/src/provider/Provider.ts +++ b/src/provider/Provider.ts @@ -264,8 +264,12 @@ export class Provider extends Instantiable { return `${this.url}${apiPath}/nonce` } + public getConsumeEndpointShort(): string { + return `${apiPath}/consume` + } + public getConsumeEndpoint(): string { - return `${this.url}${apiPath}/consume` + return `${this.url}` + this.getConsumeEndpointShort() } public getEncryptEndpoint(): string { @@ -276,8 +280,12 @@ export class Provider extends Instantiable { return `${this.url}${apiPath}/publish` } + public getComputeEndpointShort(): string { + return `${apiPath}/compute` + } + public getComputeEndpoint(): string { - return `${this.url}${apiPath}/compute` + return `${this.url}` + this.getComputeEndpointShort() } public getDownloadEndpoint(): string {