Skip to content

Commit e4d494d

Browse files
authored
[price_pusher] fix bug from last PR (#916)
1 parent dfc2df7 commit e4d494d

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
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.0",
3+
"version": "5.4.1",
44
"description": "Pyth Price Pusher",
55
"homepage": "https://pyth.network",
66
"main": "lib/index.js",

price_pusher/src/sui/command.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { PythPriceListener } from "../pyth-price-listener";
66
import { Controller } from "../controller";
77
import { Options } from "yargs";
88
import { SuiPriceListener, SuiPricePusher } from "./sui";
9+
import { Ed25519Keypair } from "@mysten/sui.js";
910

1011
export default {
1112
command: "sui",
@@ -105,6 +106,13 @@ export default {
105106
}
106107
);
107108
const mnemonic = fs.readFileSync(mnemonicFile, "utf-8").trim();
109+
console.log(
110+
`Pushing updates from wallet address: ${Ed25519Keypair.deriveKeypair(
111+
mnemonic
112+
)
113+
.getPublicKey()
114+
.toSuiAddress()}`
115+
);
108116

109117
const priceItems = priceConfigs.map(({ id, alias }) => ({ id, alias }));
110118

price_pusher/src/sui/sui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class SuiPricePusher implements IPricePusher {
144144
const txs = [];
145145
let currentBatchVaas = [];
146146
let currentBatchPriceFeedIds = [];
147-
for (const [vaa, priceFeedIds] of Object.entries(vaaToPriceFeedIds)) {
147+
for (const [vaa, priceFeedIds] of vaaToPriceFeedIds.entries()) {
148148
currentBatchVaas.push(vaa);
149149
currentBatchPriceFeedIds.push(...priceFeedIds);
150150
if (currentBatchVaas.length >= this.maxVaasPerPtb) {

0 commit comments

Comments
 (0)