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 48cb847082
commit 960e90f9ec
3 changed files with 16 additions and 4 deletions

View File

@ -384,7 +384,9 @@ export class Assets extends Instantiable {
return { return {
type: 'access', type: 'access',
index: 2, index: 2,
serviceEndpoint: customProvider || this.ocean.provider.getConsumeEndpoint(), serviceEndpoint: customProvider
? customProvider + this.ocean.provider.getConsumeEndpointShort()
: this.ocean.provider.getConsumeEndpoint(),
attributes: { attributes: {
main: { main: {
creator: creator.getId(), creator: creator.getId(),

View File

@ -287,7 +287,9 @@ export class Compute extends Instantiable {
const service = { const service = {
type: 'compute', type: 'compute',
index: 3, index: 3,
serviceEndpoint: customProvider || this.ocean.provider.getComputeEndpoint(), serviceEndpoint: customProvider
? customProvider + this.ocean.provider.getComputeEndpointShort()
: this.ocean.provider.getComputeEndpoint(),
attributes: { attributes: {
main: { main: {
name, name,

View File

@ -264,8 +264,12 @@ export class Provider extends Instantiable {
return `${this.url}${apiPath}/nonce` return `${this.url}${apiPath}/nonce`
} }
public getConsumeEndpointShort(): string {
return `${apiPath}/consume`
}
public getConsumeEndpoint(): string { public getConsumeEndpoint(): string {
return `${this.url}${apiPath}/consume` return `${this.url}` + this.getConsumeEndpointShort()
} }
public getEncryptEndpoint(): string { public getEncryptEndpoint(): string {
@ -276,8 +280,12 @@ export class Provider extends Instantiable {
return `${this.url}${apiPath}/publish` return `${this.url}${apiPath}/publish`
} }
public getComputeEndpointShort(): string {
return `${apiPath}/compute`
}
public getComputeEndpoint(): string { public getComputeEndpoint(): string {
return `${this.url}${apiPath}/compute` return `${this.url}` + this.getComputeEndpointShort()
} }
public getDownloadEndpoint(): string { public getDownloadEndpoint(): string {