From d92b702823b8a1b77ec32625130448dcb22605e8 Mon Sep 17 00:00:00 2001 From: pierregee Date: Fri, 25 Aug 2023 15:31:27 +0800 Subject: [PATCH] add changi on configs --- apps/legacy-api/src/pipes/NetworkValidationPipe.ts | 5 +++-- apps/whale-api/src/app.configuration.ts | 2 +- packages/ocean-api-client/src/OceanApiClient.ts | 2 +- packages/testcontainers/src/containers/DeFiDContainer.ts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/legacy-api/src/pipes/NetworkValidationPipe.ts b/apps/legacy-api/src/pipes/NetworkValidationPipe.ts index f6c727f721..7ae5ba953c 100644 --- a/apps/legacy-api/src/pipes/NetworkValidationPipe.ts +++ b/apps/legacy-api/src/pipes/NetworkValidationPipe.ts @@ -5,7 +5,7 @@ import { PipeTransform } from '@nestjs/common' -export type SupportedNetwork = 'mainnet' | 'testnet' | 'devnet' | 'regtest' +export type SupportedNetwork = 'mainnet' | 'testnet' | 'devnet' | 'regtest' | 'changi' @Injectable() export class NetworkValidationPipe implements PipeTransform { @@ -14,7 +14,8 @@ export class NetworkValidationPipe implements PipeTransform { 'mainnet', 'testnet', 'devnet', - 'regtest' + 'regtest', + 'changi' ]) transform (value: any, metadata: ArgumentMetadata): any { diff --git a/apps/whale-api/src/app.configuration.ts b/apps/whale-api/src/app.configuration.ts index b3811c2a6c..92ef71d0f6 100644 --- a/apps/whale-api/src/app.configuration.ts +++ b/apps/whale-api/src/app.configuration.ts @@ -31,7 +31,7 @@ export function ENV_VALIDATION_SCHEMA (): any { return Joi.object({ NODE_ENV: Joi.string().optional(), WHALE_VERSION: Joi.string().optional(), - WHALE_NETWORK: Joi.string().valid('mainnet', 'testnet', 'regtest', 'devnet').default('regtest'), + WHALE_NETWORK: Joi.string().valid('mainnet', 'testnet', 'regtest', 'devnet', 'changi').default('regtest'), WHALE_DEFID_URL: Joi.string().optional(), WHALE_DATABASE_PROVIDER: Joi.string().optional(), WHALE_DATABASE_LEVEL_LOCATION: Joi.string().optional() diff --git a/packages/ocean-api-client/src/OceanApiClient.ts b/packages/ocean-api-client/src/OceanApiClient.ts index 1542a350f9..ebe18b7b50 100644 --- a/packages/ocean-api-client/src/OceanApiClient.ts +++ b/packages/ocean-api-client/src/OceanApiClient.ts @@ -24,7 +24,7 @@ export interface OceanApiClientOptions { /** * Network that ocean client is configured to */ - network?: 'mainnet' | 'testnet' | 'devnet' | 'regtest' | string + network?: 'mainnet' | 'testnet' | 'devnet' | 'regtest' | 'changi' | string } /** diff --git a/packages/testcontainers/src/containers/DeFiDContainer.ts b/packages/testcontainers/src/containers/DeFiDContainer.ts index 7b5499c63a..b04feb86dd 100644 --- a/packages/testcontainers/src/containers/DeFiDContainer.ts +++ b/packages/testcontainers/src/containers/DeFiDContainer.ts @@ -6,7 +6,7 @@ import { NativeChainRpc } from '../index' /** * Types of network as per https://github.com/DeFiCh/ain/blob/bc231241/src/chainparams.cpp#L825-L836 */ -type Network = 'mainnet' | 'testnet' | 'devnet' | 'regtest' +type Network = 'mainnet' | 'testnet' | 'devnet' | 'regtest' | 'changi' /** * Mandatory options to start defid with