1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

extra checks

This commit is contained in:
alexcos20 2020-09-16 06:44:01 -07:00
parent ed5e3e7b93
commit 554ab76dc6
3 changed files with 16 additions and 4 deletions

View File

@ -385,7 +385,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(),

View File

@ -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,

View File

@ -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 {