Skip to content

Commit

Permalink
Mark isTestnet as required (safe-global#1163)
Browse files Browse the repository at this point in the history
This marks `Chain['isTestnet']` as required now that it is stable.
  • Loading branch information
iamacook authored Feb 19, 2024
1 parent a286a32 commit 9b19c81
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/domain/chains/entities/chain.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/domain/chains/entities/schemas/chain.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ export const chainSchema: JSONSchemaType<Chain> = {
// 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' },
Expand All @@ -149,7 +148,7 @@ export const chainSchema: JSONSchemaType<Chain> = {
'description',
// 'chainLogoUri',
'l2',
// isTestnet,
'isTestnet',
'shortName',
'rpcUri',
'safeAppsRpcUri',
Expand Down
8 changes: 3 additions & 5 deletions src/routes/chains/entities/chain.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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,
) {
Expand Down

0 comments on commit 9b19c81

Please sign in to comment.