Restart pusher on balance issues (#1125)
* Restart pusher on balance issues * Bump
This commit is contained in:
parent
d07579e0a6
commit
d4fad5049c
|
@ -54807,7 +54807,7 @@
|
|||
},
|
||||
"price_pusher": {
|
||||
"name": "@pythnetwork/price-pusher",
|
||||
"version": "5.7.0",
|
||||
"version": "5.7.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@injectivelabs/sdk-ts": "1.10.72",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@pythnetwork/price-pusher",
|
||||
"version": "5.7.0",
|
||||
"version": "5.7.1",
|
||||
"description": "Pyth Price Pusher",
|
||||
"homepage": "https://pyth.network",
|
||||
"main": "lib/index.js",
|
||||
|
|
|
@ -299,10 +299,12 @@ export class SuiPricePusher implements IPricePusher {
|
|||
);
|
||||
} catch (e: any) {
|
||||
console.log("Error when signAndExecuteTransactionBlock");
|
||||
if (String(e).includes("GasBalanceTooLow")) {
|
||||
console.warn(
|
||||
`The balance of gas object ${gasObject.objectId} is too low. Removing from pool.`
|
||||
);
|
||||
if (
|
||||
String(e).includes("Balance of gas object") ||
|
||||
String(e).includes("GasBalanceTooLow")
|
||||
) {
|
||||
// If the error is caused by insufficient gas, we should panic
|
||||
throw e;
|
||||
} else {
|
||||
// Refresh the coin object here in case the error is caused by an object version mismatch.
|
||||
nextGasObject = await SuiPricePusher.tryRefreshObjectReference(
|
||||
|
|
Loading…
Reference in New Issue