File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @pythnetwork/price-pusher" ,
3- "version" : " 9.3.2 " ,
3+ "version" : " 9.3.3 " ,
44 "description" : " Pyth Price Pusher" ,
55 "homepage" : " https://pyth.network" ,
66 "main" : " lib/index.js" ,
Original file line number Diff line number Diff line change @@ -36,18 +36,12 @@ export class SuiBalanceTracker extends BaseBalanceTracker {
3636 */
3737 protected async updateBalance ( ) : Promise < void > {
3838 try {
39- // Get all coins owned by the address
40- const { data : coins } = await this . client . getCoins ( {
39+ const balance = await this . client . getBalance ( {
4140 owner : this . address ,
4241 } ) ;
4342
44- // Sum up all coin balances
45- const totalBalance = coins . reduce ( ( acc , coin ) => {
46- return acc + BigInt ( coin . balance ) ;
47- } , BigInt ( 0 ) ) ;
48-
4943 // Convert to a normalized number for reporting (SUI has 9 decimals)
50- const normalizedBalance = Number ( totalBalance ) / 1e9 ;
44+ const normalizedBalance = Number ( balance . totalBalance ) / 1e9 ;
5145
5246 this . metrics . updateWalletBalance (
5347 this . address ,
You can’t perform that action at this time.
0 commit comments