mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Transform the versions object to an array with properties.
This commit is contained in:
parent
0438beef2b
commit
21fa3495c5
@ -22,7 +22,7 @@ interface OceanPlatformKeeperTech extends OceanPlatformTech {
|
|||||||
contracts?: {[contractName: string]: string}
|
contracts?: {[contractName: string]: string}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OceanPlatformVersions {
|
export interface OceanPlatformVersions extends Array<OceanPlatformKeeperTech | OceanPlatformTech> {
|
||||||
squid: OceanPlatformKeeperTech
|
squid: OceanPlatformKeeperTech
|
||||||
aquarius: OceanPlatformTech
|
aquarius: OceanPlatformTech
|
||||||
brizo: OceanPlatformKeeperTech
|
brizo: OceanPlatformKeeperTech
|
||||||
@ -50,7 +50,7 @@ export class OceanVersions extends Instantiable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async get(): Promise<OceanPlatformVersions> {
|
public async get(): Promise<OceanPlatformVersions> {
|
||||||
const versions = {} as OceanPlatformVersions
|
const versions = ([] as any) as OceanPlatformVersions
|
||||||
|
|
||||||
// Squid
|
// Squid
|
||||||
versions.squid = {
|
versions.squid = {
|
||||||
@ -102,6 +102,7 @@ export class OceanVersions extends Instantiable {
|
|||||||
|
|
||||||
// Status
|
// Status
|
||||||
const techs: OceanPlatformKeeperTech[] = Object.values(versions as any)
|
const techs: OceanPlatformKeeperTech[] = Object.values(versions as any)
|
||||||
|
versions.push(...techs)
|
||||||
|
|
||||||
const networks = techs
|
const networks = techs
|
||||||
.map(({network}) => network)
|
.map(({network}) => network)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user