mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Merge branch 'feature/customProvider' of https://github.com/oceanprotocol/ocean-lib-js into feature/customProvider
This commit is contained in:
commit
34022360e3
@ -395,6 +395,7 @@ export class Assets extends Instantiable {
|
||||
index: 2,
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
serviceEndpoint: customProvider || this.ocean.provider.url,
|
||||
=======
|
||||
@ -408,6 +409,9 @@ export class Assets extends Instantiable {
|
||||
=======
|
||||
serviceEndpoint: customProvider || this.ocean.provider.url,
|
||||
>>>>>>> 11b58cb... more customProvider code
|
||||
=======
|
||||
serviceEndpoint: customProvider || this.ocean.provider.url,
|
||||
>>>>>>> ae4011914b2749d3fa467d513c49ef97a8d22ed6
|
||||
attributes: {
|
||||
main: {
|
||||
creator: creator.getId(),
|
||||
|
@ -94,9 +94,12 @@ export class Compute extends Instantiable {
|
||||
if (did && txId) {
|
||||
const provider = new Provider(this.instanceConfig)
|
||||
provider.setBaseUrl(serviceEndpoint)
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
const computeJobsList = await provider.compute(
|
||||
=======
|
||||
=======
|
||||
>>>>>>> ae4011914b2749d3fa467d513c49ef97a8d22ed6
|
||||
const computeJobsList = await this.ocean.provider.compute(
|
||||
>>>>>>> 11b58cb... more customProvider code
|
||||
'post',
|
||||
@ -298,6 +301,7 @@ export class Compute extends Instantiable {
|
||||
type: 'compute',
|
||||
index: 3,
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
serviceEndpoint: customProvider
|
||||
? customProvider + this.ocean.provider.getComputeEndpointShort()
|
||||
@ -310,6 +314,11 @@ export class Compute extends Instantiable {
|
||||
? customProvider + this.ocean.provider.getComputeEndpointShort()
|
||||
: this.ocean.provider.getComputeEndpoint(),
|
||||
>>>>>>> 960e90f... extra checks
|
||||
=======
|
||||
serviceEndpoint: customProvider
|
||||
? customProvider + this.ocean.provider.getComputeEndpointShort()
|
||||
: this.ocean.provider.getComputeEndpoint(),
|
||||
>>>>>>> ae4011914b2749d3fa467d513c49ef97a8d22ed6
|
||||
attributes: {
|
||||
main: {
|
||||
name,
|
||||
|
@ -298,19 +298,25 @@ export class Provider extends Instantiable {
|
||||
return `${this.url}${apiPath}/download`
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 48cb847... extra check
|
||||
=======
|
||||
>>>>>>> ae4011914b2749d3fa467d513c49ef97a8d22ed6
|
||||
/** Check for a valid provider at URL
|
||||
* @param {String} url
|
||||
* @return {Promise<boolean>} string
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 17e61d0... allow customProvider on publish
|
||||
=======
|
||||
>>>>>>> 48cb847... extra check
|
||||
=======
|
||||
>>>>>>> ae4011914b2749d3fa467d513c49ef97a8d22ed6
|
||||
public async isValidProvider(url: string): Promise<boolean> {
|
||||
const fetch = this.ocean.utils.fetch.get(url)
|
||||
await fetch
|
||||
@ -318,6 +324,7 @@ export class Provider extends Instantiable {
|
||||
if (response.ok) {
|
||||
const params = response.json()
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
if (params['provider-address']) return true
|
||||
=======
|
||||
@ -326,6 +333,9 @@ export class Provider extends Instantiable {
|
||||
=======
|
||||
if (params['provider-address']) return true
|
||||
>>>>>>> 48cb847... extra check
|
||||
=======
|
||||
if (params['provider-address']) return true
|
||||
>>>>>>> ae4011914b2749d3fa467d513c49ef97a8d22ed6
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user