@@ -152,6 +152,7 @@ export class AccountController {
152152 @ApiQuery ( { name : 'search' , description : 'Search by account address, assets name' , required : false } )
153153 @ApiQuery ( { name : 'excludeTags' , description : 'Exclude specific tags from result' , required : false } )
154154 @ApiQuery ( { name : 'hasAssets' , description : 'Returns a list of accounts that have assets' , required : false } )
155+ @ApiQuery ( { name : 'withBalance' , description : 'Filter accounts by balance (true = balance > 0, false = balance = 0)' , required : false , type : Boolean } )
155156 async getAccountsCount (
156157 @Query ( "ownerAddress" , ParseAddressPipe ) ownerAddress ?: string ,
157158 @Query ( "isSmartContract" , ParseBoolPipe ) isSmartContract ?: boolean ,
@@ -160,6 +161,7 @@ export class AccountController {
160161 @Query ( "excludeTags" , ParseArrayPipe ) excludeTags ?: string [ ] ,
161162 @Query ( "hasAssets" , ParseBoolPipe ) hasAssets ?: boolean ,
162163 @Query ( "search" ) search ?: string ,
164+ @Query ( "withBalance" , ParseBoolPipe ) withBalance ?: boolean ,
163165 ) : Promise < number > {
164166 return await this . accountService . getAccountsCount (
165167 new AccountQueryOptions (
@@ -171,6 +173,7 @@ export class AccountController {
171173 excludeTags,
172174 hasAssets,
173175 search,
176+ withBalance,
174177 } ) ) ;
175178 }
176179
@@ -184,6 +187,7 @@ export class AccountController {
184187 @Query ( "excludeTags" , ParseArrayPipe ) excludeTags ?: string [ ] ,
185188 @Query ( "hasAssets" , ParseBoolPipe ) hasAssets ?: boolean ,
186189 @Query ( "search" ) search ?: string ,
190+ @Query ( "withBalance" , ParseBoolPipe ) withBalance ?: boolean ,
187191 ) : Promise < number > {
188192 return await this . accountService . getAccountsCount (
189193 new AccountQueryOptions (
@@ -195,6 +199,7 @@ export class AccountController {
195199 excludeTags,
196200 hasAssets,
197201 search,
202+ withBalance,
198203 } ) ) ;
199204 }
200205
0 commit comments