[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:
parent
78ca49dcc3
commit
ac0519b57a
|
@ -56003,7 +56003,7 @@
|
||||||
},
|
},
|
||||||
"price_pusher": {
|
"price_pusher": {
|
||||||
"name": "@pythnetwork/price-pusher",
|
"name": "@pythnetwork/price-pusher",
|
||||||
"version": "5.4.8",
|
"version": "5.4.9",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@injectivelabs/sdk-ts": "1.10.72",
|
"@injectivelabs/sdk-ts": "1.10.72",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@pythnetwork/price-pusher",
|
"name": "@pythnetwork/price-pusher",
|
||||||
"version": "5.4.8",
|
"version": "5.4.9",
|
||||||
"description": "Pyth Price Pusher",
|
"description": "Pyth Price Pusher",
|
||||||
"homepage": "https://pyth.network",
|
"homepage": "https://pyth.network",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
|
|
|
@ -133,6 +133,7 @@ export class InjectivePricePusher implements IPricePusher {
|
||||||
|
|
||||||
const txService = new TxGrpcClient(this.grpcEndpoint);
|
const txService = new TxGrpcClient(this.grpcEndpoint);
|
||||||
// simulation
|
// simulation
|
||||||
|
try {
|
||||||
const {
|
const {
|
||||||
gasInfo: { gasUsed },
|
gasInfo: { gasUsed },
|
||||||
} = await txService.simulate(simulateTxRaw);
|
} = await txService.simulate(simulateTxRaw);
|
||||||
|
@ -163,7 +164,6 @@ export class InjectivePricePusher implements IPricePusher {
|
||||||
|
|
||||||
const sig = await this.wallet.sign(Buffer.from(signBytes));
|
const sig = await this.wallet.sign(Buffer.from(signBytes));
|
||||||
|
|
||||||
try {
|
|
||||||
this.account.baseAccount.sequence++;
|
this.account.baseAccount.sequence++;
|
||||||
|
|
||||||
/** Append Signatures */
|
/** Append Signatures */
|
||||||
|
|
Loading…
Reference in New Issue