소스 검색

fix; revert pnpm lock

Daniel Chew 8 달 전
부모
커밋
b007d78030
4개의 변경된 파일103개의 추가작업 그리고 402개의 파일을 삭제
  1. 11 12
      apps/price_pusher/src/controller.ts
  2. 9 7
      apps/price_pusher/src/evm/command.ts
  3. 8 7
      apps/price_pusher/src/metrics.ts
  4. 75 376
      pnpm-lock.yaml

+ 11 - 12
apps/price_pusher/src/controller.ts

@@ -29,7 +29,7 @@ export class Controller {
       pushingFrequency: DurationInSeconds;
       metrics?: PricePusherMetrics;
       walletBalanceInfo?: WalletBalanceInfo;
-    }
+    },
   ) {
     this.pushingFrequency = config.pushingFrequency;
     this.metrics = config.metrics;
@@ -47,17 +47,16 @@ export class Controller {
 
     try {
       const { client, address, network } = this.walletBalanceInfo;
-      const balance = await client.getBalance({ address: address as `0x${string}` });
+      const balance = await client.getBalance({
+        address: address as `0x${string}`,
+      });
 
       this.metrics.updateWalletBalance(address, network, balance);
       this.logger.debug(
-        `Updated wallet balance: ${address} = ${balance.toString()}`
+        `Updated wallet balance: ${address} = ${balance.toString()}`,
       );
     } catch (error) {
-      this.logger.error(
-        { error },
-        "Error fetching wallet balance for metrics"
-      );
+      this.logger.error({ error }, "Error fetching wallet balance for metrics");
     }
   }
 
@@ -102,7 +101,7 @@ export class Controller {
           this.metrics.updateLastPublishedTime(
             priceId,
             alias,
-            targetLatestPrice
+            targetLatestPrice,
           );
         }
 
@@ -151,14 +150,14 @@ export class Controller {
                 config,
                 timer: this.metrics!.startPriceUpdateTimer(
                   config.id,
-                  config.alias
+                  config.alias,
                 ),
               }))
             : [];
 
           await this.targetChainPricePusher.updatePriceFeed(
             priceIds,
-            pubTimesToPush
+            pubTimesToPush,
           );
 
           // Record successful updates and end timers
@@ -171,7 +170,7 @@ export class Controller {
         } catch (error) {
           this.logger.error(
             { error, priceIds },
-            "Error pushing price updates to chain"
+            "Error pushing price updates to chain",
           );
 
           // Record errors in metrics
@@ -180,7 +179,7 @@ export class Controller {
               this.metrics.recordPriceUpdateError(
                 config.id,
                 config.alias,
-                error instanceof Error ? error.name : "unknown"
+                error instanceof Error ? error.name : "unknown",
               );
             }
           }

+ 9 - 7
apps/price_pusher/src/evm/command.ts

@@ -199,13 +199,15 @@ export default {
       {
         pushingFrequency,
         metrics,
-        walletBalanceInfo: metrics ? {
-          client,
-          address: client.account.address,
-          network: await client.getChainId().then(id => id.toString()),
-          updateInterval: pushingFrequency
-        } : undefined
-      }
+        walletBalanceInfo: metrics
+          ? {
+              client,
+              address: client.account.address,
+              network: await client.getChainId().then((id) => id.toString()),
+              updateInterval: pushingFrequency,
+            }
+          : undefined,
+      },
     );
 
     await controller.start();

+ 8 - 7
apps/price_pusher/src/metrics.ts

@@ -96,11 +96,11 @@ export class PricePusherMetrics {
   public updateLastPublishedTime(
     priceId: string,
     alias: string,
-    priceInfo: PriceInfo
+    priceInfo: PriceInfo,
   ): void {
     this.lastPublishedTime.set(
       { price_id: priceId, alias },
-      priceInfo.publishTime
+      priceInfo.publishTime,
     );
   }
 
@@ -118,7 +118,7 @@ export class PricePusherMetrics {
   public recordPriceUpdateError(
     priceId: string,
     alias: string,
-    errorType: string
+    errorType: string,
   ): void {
     this.priceUpdateErrors.inc({
       price_id: priceId,
@@ -145,16 +145,17 @@ export class PricePusherMetrics {
   public updateWalletBalance(
     walletAddress: string,
     network: string,
-    balance: bigint | number
+    balance: bigint | number,
   ): void {
     // Convert to number for compatibility with prometheus
-    const balanceNum = typeof balance === 'bigint' ? Number(balance) / 1e18 : balance;
+    const balanceNum =
+      typeof balance === "bigint" ? Number(balance) / 1e18 : balance;
     this.walletBalance.set(
       { wallet_address: walletAddress, network },
-      balanceNum
+      balanceNum,
     );
     this.logger.debug(
-      `Updated wallet balance metric: ${walletAddress} = ${balanceNum}`
+      `Updated wallet balance metric: ${walletAddress} = ${balanceNum}`,
     );
   }
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 75 - 376
pnpm-lock.yaml


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.