Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit c060328

Browse files
authored
[price-pusher] Bugfix (#87)
- Capture another nonce error
1 parent e518976 commit c060328

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

pyth-evm-price-pusher/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyth-evm-price-pusher/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-evm-price-pusher",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Pyth EVM Price Pusher",
55
"homepage": "https://pyth.network",
66
"main": "lib/index.js",

pyth-evm-price-pusher/src/pusher.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class Pusher {
106106
.on("transactionHash", (hash: string) => {
107107
console.log(`Successful. Tx hash: ${hash}`);
108108
})
109-
.on("error", (err: Error, receipt: TransactionReceipt) => {
109+
.on("error", (err: Error, receipt?: TransactionReceipt) => {
110110
if (
111111
err.message.includes(
112112
"VM Exception while processing transaction: revert"
@@ -123,7 +123,10 @@ export class Pusher {
123123
return;
124124
}
125125

126-
if (err.message.includes("the tx doesn't have the correct nonce.")) {
126+
if (
127+
err.message.includes("the tx doesn't have the correct nonce.") ||
128+
err.message.includes("nonce too low")
129+
) {
127130
console.log(
128131
"Multiple users are using the same accounts and nonce is incorrect. Skipping this push."
129132
);

0 commit comments

Comments
 (0)