Skip to content

Commit

Permalink
fix: swagger config & rpc availability (#69)
Browse files Browse the repository at this point in the history
## Description

- small fixes
  • Loading branch information
0xnigir1 authored Sep 10, 2024
1 parent 2b57b0f commit b049777
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/api-docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ info:
description: Documentation for ZKchainHub API
version: 1.0
servers:
- url: http://localhost:3000
description: Local server
- url: /
description: Server

tags:
- name: Metrics
Expand Down
5 changes: 3 additions & 2 deletions apps/api/src/metrics/controllers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ export class MetricsController {
}, new BigNumber(0))
.toString();
const chainIdStr = chainId.toString();
const hasRpc = this.l2MetricsMap.has(chainId);
if (!metadata) {
return {
chainId: chainIdStr,
chainType: await this.l1MetricsService.chainType(chainId),
baseToken: (await this.l1MetricsService.getBaseTokens([chainId]))[0],
tvl,
rpc: false,
rpc: hasRpc,
};
}
return {
Expand All @@ -47,7 +48,7 @@ export class MetricsController {
baseToken: metadata.baseToken,
tvl,
metadata: new ZkChainMetadata(metadata),
rpc: false,
rpc: hasRpc,
};
}),
);
Expand Down

0 comments on commit b049777

Please sign in to comment.