diff --git a/apps/price_pusher/package.json b/apps/price_pusher/package.json index 778ba5eb9a..a29842140d 100644 --- a/apps/price_pusher/package.json +++ b/apps/price_pusher/package.json @@ -1,6 +1,6 @@ { "name": "@pythnetwork/price-pusher", - "version": "9.3.2", + "version": "9.3.3", "description": "Pyth Price Pusher", "homepage": "https://pyth.network", "main": "lib/index.js", diff --git a/apps/price_pusher/src/sui/balance-tracker.ts b/apps/price_pusher/src/sui/balance-tracker.ts index 2b2dde2e60..7e74f6ac77 100644 --- a/apps/price_pusher/src/sui/balance-tracker.ts +++ b/apps/price_pusher/src/sui/balance-tracker.ts @@ -36,18 +36,12 @@ export class SuiBalanceTracker extends BaseBalanceTracker { */ protected async updateBalance(): Promise { try { - // Get all coins owned by the address - const { data: coins } = await this.client.getCoins({ + const balance = await this.client.getBalance({ owner: this.address, }); - // Sum up all coin balances - const totalBalance = coins.reduce((acc, coin) => { - return acc + BigInt(coin.balance); - }, BigInt(0)); - // Convert to a normalized number for reporting (SUI has 9 decimals) - const normalizedBalance = Number(totalBalance) / 1e9; + const normalizedBalance = Number(balance.totalBalance) / 1e9; this.metrics.updateWalletBalance( this.address,