[price-pusher] Bugfix in handling account sequence mismatch (#1028)

account sequence mismatch error could happen in the simulation but the
try catch did not cover that part
Verified the fix by manually incrementing the sequence number twice after
each transaction so a refetch was necessary
This commit is contained in:
Mohammad Amin Khashkhashi Moghaddam 2023-08-24 11:57:30 +02:00 committed by GitHub
parent 78ca49dcc3
commit ac0519b57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 32 deletions

2
package-lock.json generated
View File

@ -56003,7 +56003,7 @@
},
"price_pusher": {
"name": "@pythnetwork/price-pusher",
"version": "5.4.8",
"version": "5.4.9",
"license": "Apache-2.0",
"dependencies": {
"@injectivelabs/sdk-ts": "1.10.72",

View File

@ -1,6 +1,6 @@
{
"name": "@pythnetwork/price-pusher",
"version": "5.4.8",
"version": "5.4.9",
"description": "Pyth Price Pusher",
"homepage": "https://pyth.network",
"main": "lib/index.js",

View File

@ -133,6 +133,7 @@ export class InjectivePricePusher implements IPricePusher {
const txService = new TxGrpcClient(this.grpcEndpoint);
// simulation
try {
const {
gasInfo: { gasUsed },
} = await txService.simulate(simulateTxRaw);
@ -163,7 +164,6 @@ export class InjectivePricePusher implements IPricePusher {
const sig = await this.wallet.sign(Buffer.from(signBytes));
try {
this.account.baseAccount.sequence++;
/** Append Signatures */