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
|
||||
if (!path) return null
|
||||
let response
|
||||
const providerChain: number = providerEndpoints.chainId
|
||||
try {
|
||||
response = await fetch(path, {
|
||||
response = await fetch(path + `?chainId=${providerChain}`, {
|
||||
method: 'GET',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
signal
|
||||
@ -320,7 +321,6 @@ export class Provider {
|
||||
if (response?.ok) {
|
||||
const result = response.json()
|
||||
if (Array.isArray(result)) {
|
||||
const providerChain: number = providerEndpoints.chainId
|
||||
return { [providerChain]: result }
|
||||
}
|
||||
return result
|
||||
|
Loading…
x
Reference in New Issue
Block a user