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 1
1
{
2
2
"name" : " @pythnetwork/price-pusher" ,
3
- "version" : " 9.3.2 " ,
3
+ "version" : " 9.3.3 " ,
4
4
"description" : " Pyth Price Pusher" ,
5
5
"homepage" : " https://pyth.network" ,
6
6
"main" : " lib/index.js" ,
Original file line number Diff line number Diff line change @@ -36,18 +36,12 @@ export class SuiBalanceTracker extends BaseBalanceTracker {
36
36
*/
37
37
protected async updateBalance ( ) : Promise < void > {
38
38
try {
39
- // Get all coins owned by the address
40
- const { data : coins } = await this . client . getCoins ( {
39
+ const balance = await this . client . getBalance ( {
41
40
owner : this . address ,
42
41
} ) ;
43
42
44
- // Sum up all coin balances
45
- const totalBalance = coins . reduce ( ( acc , coin ) => {
46
- return acc + BigInt ( coin . balance ) ;
47
- } , BigInt ( 0 ) ) ;
48
-
49
43
// Convert to a normalized number for reporting (SUI has 9 decimals)
50
- const normalizedBalance = Number ( totalBalance ) / 1e9 ;
44
+ const normalizedBalance = Number ( balance . totalBalance ) / 1e9 ;
51
45
52
46
this . metrics . updateWalletBalance (
53
47
this . address ,
You can’t perform that action at this time.
0 commit comments