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": {
|
"price_pusher": {
|
||||||
"name": "@pythnetwork/price-pusher",
|
"name": "@pythnetwork/price-pusher",
|
||||||
"version": "5.7.0",
|
"version": "5.7.1",
|
||||||
"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.7.0",
|
"version": "5.7.1",
|
||||||
"description": "Pyth Price Pusher",
|
"description": "Pyth Price Pusher",
|
||||||
"homepage": "https://pyth.network",
|
"homepage": "https://pyth.network",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
|
|
|
@ -299,10 +299,12 @@ export class SuiPricePusher implements IPricePusher {
|
||||||
);
|
);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.log("Error when signAndExecuteTransactionBlock");
|
console.log("Error when signAndExecuteTransactionBlock");
|
||||||
if (String(e).includes("GasBalanceTooLow")) {
|
if (
|
||||||
console.warn(
|
String(e).includes("Balance of gas object") ||
|
||||||
`The balance of gas object ${gasObject.objectId} is too low. Removing from pool.`
|
String(e).includes("GasBalanceTooLow")
|
||||||
);
|
) {
|
||||||
|
// If the error is caused by insufficient gas, we should panic
|
||||||
|
throw e;
|
||||||
} else {
|
} else {
|
||||||
// Refresh the coin object here in case the error is caused by an object version mismatch.
|
// Refresh the coin object here in case the error is caused by an object version mismatch.
|
||||||
nextGasObject = await SuiPricePusher.tryRefreshObjectReference(
|
nextGasObject = await SuiPricePusher.tryRefreshObjectReference(
|
||||||
|
|
Loading…
Reference in New Issue