1
0
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:
Pedro Gutiérrez 2019-06-14 12:05:59 +02:00
parent 0438beef2b
commit 21fa3495c5

View File

@ -22,7 +22,7 @@ interface OceanPlatformKeeperTech extends OceanPlatformTech {
contracts?: {[contractName: string]: string}
}
export interface OceanPlatformVersions {
export interface OceanPlatformVersions extends Array<OceanPlatformKeeperTech | OceanPlatformTech> {
squid: OceanPlatformKeeperTech
aquarius: OceanPlatformTech
brizo: OceanPlatformKeeperTech
@ -50,7 +50,7 @@ export class OceanVersions extends Instantiable {
}
public async get(): Promise<OceanPlatformVersions> {
const versions = {} as OceanPlatformVersions
const versions = ([] as any) as OceanPlatformVersions
// Squid
versions.squid = {
@ -102,6 +102,7 @@ export class OceanVersions extends Instantiable {
// Status
const techs: OceanPlatformKeeperTech[] = Object.values(versions as any)
versions.push(...techs)
const networks = techs
.map(({network}) => network)