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

Commit

Permalink
[price-pusher] Bugfix (#87)
Browse files Browse the repository at this point in the history
- Capture another nonce error
  • Loading branch information
ali-bahjati authored Feb 17, 2023
1 parent e518976 commit c060328
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyth-evm-price-pusher/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyth-evm-price-pusher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/pyth-evm-price-pusher",
"version": "2.0.0",
"version": "2.0.1",
"description": "Pyth EVM Price Pusher",
"homepage": "https://pyth.network",
"main": "lib/index.js",
Expand Down
7 changes: 5 additions & 2 deletions pyth-evm-price-pusher/src/pusher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class Pusher {
.on("transactionHash", (hash: string) => {
console.log(`Successful. Tx hash: ${hash}`);
})
.on("error", (err: Error, receipt: TransactionReceipt) => {
.on("error", (err: Error, receipt?: TransactionReceipt) => {
if (
err.message.includes(
"VM Exception while processing transaction: revert"
Expand All @@ -123,7 +123,10 @@ export class Pusher {
return;
}

if (err.message.includes("the tx doesn't have the correct nonce.")) {
if (
err.message.includes("the tx doesn't have the correct nonce.") ||
err.message.includes("nonce too low")
) {
console.log(
"Multiple users are using the same accounts and nonce is incorrect. Skipping this push."
);
Expand Down

0 comments on commit c060328

Please sign in to comment.