Skip to content

Commit

Permalink
feat: add ethPrice to gasInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnigir1 committed Aug 19, 2024
1 parent 2777ad8 commit 3f1b6dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/api/src/metrics/dto/response/l1Metrics.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,18 @@ export class EthGasInfo {
*/
erc20Transfer: string;

/**
* The price of ETH in USD
* @type {string}
* @memberof EthGasInfo
*/
ethPrice?: string;

constructor(data: EthGasInfo) {
this.gasPrice = data.gasPrice;
this.ethTransfer = data.ethTransfer;
this.erc20Transfer = data.erc20Transfer;
this.ethPrice = data.ethPrice;
}
}

Expand Down
1 change: 1 addition & 0 deletions apps/api/src/metrics/metrics.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class MetricsController {
gasPrice: gasInfo.gasPrice.toString(),
erc20Transfer: gasInfo.erc20Transfer.toString(),
ethTransfer: gasInfo.ethTransfer.toString(),
ethPrice: gasInfo.ethPrice?.toString() || undefined,
},
zkChains,
});
Expand Down

0 comments on commit 3f1b6dd

Please sign in to comment.