mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Added chanId to getComputeEnvironments url path.
This commit is contained in:
parent
1f4e4336dd
commit
b1a081e7f8
@ -306,8 +306,9 @@ export class Provider {
|
|||||||
const path = this.getEndpointURL(serviceEndpoints, 'computeEnvironments')?.urlPath
|
const path = this.getEndpointURL(serviceEndpoints, 'computeEnvironments')?.urlPath
|
||||||
if (!path) return null
|
if (!path) return null
|
||||||
let response
|
let response
|
||||||
|
const providerChain: number = providerEndpoints.chainId
|
||||||
try {
|
try {
|
||||||
response = await fetch(path, {
|
response = await fetch(path + `?chainId=${providerChain}`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
signal
|
signal
|
||||||
@ -320,7 +321,6 @@ export class Provider {
|
|||||||
if (response?.ok) {
|
if (response?.ok) {
|
||||||
const result = response.json()
|
const result = response.json()
|
||||||
if (Array.isArray(result)) {
|
if (Array.isArray(result)) {
|
||||||
const providerChain: number = providerEndpoints.chainId
|
|
||||||
return { [providerChain]: result }
|
return { [providerChain]: result }
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user