Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/price_pusher/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
10 changes: 2 additions & 8 deletions apps/price_pusher/src/sui/balance-tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,12 @@ export class SuiBalanceTracker extends BaseBalanceTracker {
*/
protected async updateBalance(): Promise<void> {
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,
Expand Down
Loading