Skip to content

Commit c54ae74

Browse files
committed
fix(apps/price_pusher): handle gas overrides properly
1 parent 1dd0c91 commit c54ae74

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

apps/price_pusher/src/evm/command.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ export default {
110110
enableMetrics,
111111
metricsPort,
112112
} = argv;
113-
console.log("***** priceServiceEndpoint *****", priceServiceEndpoint);
114113

115114
const logger = pino({
116115
level: logLevel,

apps/price_pusher/src/evm/evm.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ export class EvmPricePusher implements IPricePusher {
235235

236236
const priceIdsWith0x = priceIds.map((priceId) => addLeading0x(priceId));
237237

238+
// Update lastAttempt
239+
this.lastPushAttempt = {
240+
nonce: txNonce,
241+
gasPrice: gasPrice,
242+
};
243+
238244
try {
239245
const { request } =
240246
await this.pythContract.simulate.updatePriceFeedsIfNecessary(
@@ -383,18 +389,13 @@ export class EvmPricePusher implements IPricePusher {
383389
);
384390
throw err;
385391
}
386-
387-
// Update lastAttempt
388-
this.lastPushAttempt = {
389-
nonce: txNonce,
390-
gasPrice: gasPrice,
391-
};
392392
}
393393

394394
private async waitForTransactionReceipt(hash: `0x${string}`): Promise<void> {
395395
try {
396396
const receipt = await this.client.waitForTransactionReceipt({
397397
hash: hash,
398+
timeout: 10000,
398399
});
399400

400401
switch (receipt.status) {

0 commit comments

Comments
 (0)