From 9b19c8172e530e3194593c44f8aad20c9351eb63 Mon Sep 17 00:00:00 2001 From: Aaron Cook Date: Mon, 19 Feb 2024 16:58:09 +0100 Subject: [PATCH] Mark `isTestnet` as required (#1163) This marks `Chain['isTestnet']` as required now that it is stable. --- src/domain/chains/entities/chain.entity.ts | 3 +-- src/domain/chains/entities/schemas/chain.schema.ts | 5 ++--- src/routes/chains/entities/chain.entity.ts | 8 +++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/domain/chains/entities/chain.entity.ts b/src/domain/chains/entities/chain.entity.ts index fd6ef59358..09194d0d05 100644 --- a/src/domain/chains/entities/chain.entity.ts +++ b/src/domain/chains/entities/chain.entity.ts @@ -13,8 +13,7 @@ export interface Chain { // TODO: Make required when deemed stable on config service chainLogoUri?: string; l2: boolean; - // TODO: Make required when deemed stable on config service - isTestnet?: boolean; + isTestnet: boolean; shortName: string; rpcUri: RpcUri; safeAppsRpcUri: RpcUri; diff --git a/src/domain/chains/entities/schemas/chain.schema.ts b/src/domain/chains/entities/schemas/chain.schema.ts index d606fb9bca..e18bc1e587 100644 --- a/src/domain/chains/entities/schemas/chain.schema.ts +++ b/src/domain/chains/entities/schemas/chain.schema.ts @@ -123,8 +123,7 @@ export const chainSchema: JSONSchemaType = { // TODO: Make required when deemed stable on config service chainLogoUri: { type: 'string', format: 'uri', nullable: true }, l2: { type: 'boolean' }, - // TODO: Make required when deemed stable on config service - isTestnet: { type: 'boolean', nullable: true }, + isTestnet: { type: 'boolean' }, shortName: { type: 'string' }, rpcUri: { $ref: 'rpc-uri.json' }, safeAppsRpcUri: { $ref: 'rpc-uri.json' }, @@ -149,7 +148,7 @@ export const chainSchema: JSONSchemaType = { 'description', // 'chainLogoUri', 'l2', - // isTestnet, + 'isTestnet', 'shortName', 'rpcUri', 'safeAppsRpcUri', diff --git a/src/routes/chains/entities/chain.entity.ts b/src/routes/chains/entities/chain.entity.ts index 77cf028303..94859d4055 100644 --- a/src/routes/chains/entities/chain.entity.ts +++ b/src/routes/chains/entities/chain.entity.ts @@ -46,9 +46,8 @@ export class Chain { chainLogoUri?: string; @ApiProperty() l2: boolean; - // TODO: Make required when implemented on config service and deemed stable - @ApiPropertyOptional() - isTestnet?: boolean; + @ApiProperty() + isTestnet: boolean; @ApiProperty() nativeCurrency: ApiNativeCurrency; @ApiProperty() @@ -102,8 +101,7 @@ export class Chain { shortName: string, theme: Theme, ensRegistryAddress: string | null, - // TODO: Make required when deemed stable on config service - isTestnet?: boolean, + isTestnet: boolean, // TODO: Make required when deemed stable on config service chainLogoUri?: string, ) {