Skip to content

Commit b007d78

Browse files
committed
fix; revert pnpm lock
1 parent e55be6d commit b007d78

File tree

4 files changed

+596
-976
lines changed

4 files changed

+596
-976
lines changed

apps/price_pusher/src/controller.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class Controller {
2929
pushingFrequency: DurationInSeconds;
3030
metrics?: PricePusherMetrics;
3131
walletBalanceInfo?: WalletBalanceInfo;
32-
}
32+
},
3333
) {
3434
this.pushingFrequency = config.pushingFrequency;
3535
this.metrics = config.metrics;
@@ -47,17 +47,16 @@ export class Controller {
4747

4848
try {
4949
const { client, address, network } = this.walletBalanceInfo;
50-
const balance = await client.getBalance({ address: address as `0x${string}` });
50+
const balance = await client.getBalance({
51+
address: address as `0x${string}`,
52+
});
5153

5254
this.metrics.updateWalletBalance(address, network, balance);
5355
this.logger.debug(
54-
`Updated wallet balance: ${address} = ${balance.toString()}`
56+
`Updated wallet balance: ${address} = ${balance.toString()}`,
5557
);
5658
} catch (error) {
57-
this.logger.error(
58-
{ error },
59-
"Error fetching wallet balance for metrics"
60-
);
59+
this.logger.error({ error }, "Error fetching wallet balance for metrics");
6160
}
6261
}
6362

@@ -102,7 +101,7 @@ export class Controller {
102101
this.metrics.updateLastPublishedTime(
103102
priceId,
104103
alias,
105-
targetLatestPrice
104+
targetLatestPrice,
106105
);
107106
}
108107

@@ -151,14 +150,14 @@ export class Controller {
151150
config,
152151
timer: this.metrics!.startPriceUpdateTimer(
153152
config.id,
154-
config.alias
153+
config.alias,
155154
),
156155
}))
157156
: [];
158157

159158
await this.targetChainPricePusher.updatePriceFeed(
160159
priceIds,
161-
pubTimesToPush
160+
pubTimesToPush,
162161
);
163162

164163
// Record successful updates and end timers
@@ -171,7 +170,7 @@ export class Controller {
171170
} catch (error) {
172171
this.logger.error(
173172
{ error, priceIds },
174-
"Error pushing price updates to chain"
173+
"Error pushing price updates to chain",
175174
);
176175

177176
// Record errors in metrics
@@ -180,7 +179,7 @@ export class Controller {
180179
this.metrics.recordPriceUpdateError(
181180
config.id,
182181
config.alias,
183-
error instanceof Error ? error.name : "unknown"
182+
error instanceof Error ? error.name : "unknown",
184183
);
185184
}
186185
}

apps/price_pusher/src/evm/command.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,15 @@ export default {
199199
{
200200
pushingFrequency,
201201
metrics,
202-
walletBalanceInfo: metrics ? {
203-
client,
204-
address: client.account.address,
205-
network: await client.getChainId().then(id => id.toString()),
206-
updateInterval: pushingFrequency
207-
} : undefined
208-
}
202+
walletBalanceInfo: metrics
203+
? {
204+
client,
205+
address: client.account.address,
206+
network: await client.getChainId().then((id) => id.toString()),
207+
updateInterval: pushingFrequency,
208+
}
209+
: undefined,
210+
},
209211
);
210212

211213
await controller.start();

apps/price_pusher/src/metrics.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ export class PricePusherMetrics {
9696
public updateLastPublishedTime(
9797
priceId: string,
9898
alias: string,
99-
priceInfo: PriceInfo
99+
priceInfo: PriceInfo,
100100
): void {
101101
this.lastPublishedTime.set(
102102
{ price_id: priceId, alias },
103-
priceInfo.publishTime
103+
priceInfo.publishTime,
104104
);
105105
}
106106

@@ -118,7 +118,7 @@ export class PricePusherMetrics {
118118
public recordPriceUpdateError(
119119
priceId: string,
120120
alias: string,
121-
errorType: string
121+
errorType: string,
122122
): void {
123123
this.priceUpdateErrors.inc({
124124
price_id: priceId,
@@ -145,16 +145,17 @@ export class PricePusherMetrics {
145145
public updateWalletBalance(
146146
walletAddress: string,
147147
network: string,
148-
balance: bigint | number
148+
balance: bigint | number,
149149
): void {
150150
// Convert to number for compatibility with prometheus
151-
const balanceNum = typeof balance === 'bigint' ? Number(balance) / 1e18 : balance;
151+
const balanceNum =
152+
typeof balance === "bigint" ? Number(balance) / 1e18 : balance;
152153
this.walletBalance.set(
153154
{ wallet_address: walletAddress, network },
154-
balanceNum
155+
balanceNum,
155156
);
156157
this.logger.debug(
157-
`Updated wallet balance metric: ${walletAddress} = ${balanceNum}`
158+
`Updated wallet balance metric: ${walletAddress} = ${balanceNum}`,
158159
);
159160
}
160161
}

0 commit comments

Comments
 (0)