Skip to content

Commit aa76c15

Browse files
authored
Log sui errors (#951)
* log sui errors * fix precommit
1 parent e3fe85c commit aa76c15

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

price_pusher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/price-pusher",
3-
"version": "5.4.4",
3+
"version": "5.4.5",
44
"description": "Pyth Price Pusher",
55
"homepage": "https://pyth.network",
66
"main": "lib/index.js",

price_pusher/src/sui/sui.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ export class SuiPricePusher implements IPricePusher {
322322
"Successfully updated price with transaction digest ",
323323
result.digest
324324
);
325-
} catch (e) {
325+
} catch (e: any) {
326326
console.log("Error when signAndExecuteTransactionBlock");
327327
if (String(e).includes("GasBalanceTooLow")) {
328328
console.warn(
@@ -332,6 +332,11 @@ export class SuiPricePusher implements IPricePusher {
332332
nextGasObject = gasObject;
333333
}
334334
console.error(e);
335+
336+
if ("data" in e) {
337+
console.error("Error has .data field:");
338+
console.error(JSON.stringify(e.data));
339+
}
335340
}
336341

337342
if (nextGasObject !== undefined) {

target_chains/sui/contracts/sources/governance/set_stale_price_threshold.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ module pyth::set_stale_price_threshold_test {
100100
pyth_tests::cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
101101
test_scenario::end(scenario);
102102
}
103-
}
103+
}

0 commit comments

Comments
 (0)