File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export const DEFAULT: RequestRegistry = {
2424 bank_supply_by_denom : { url : '/cosmos/bank/v1beta1/supply/{denom}' , adapter } ,
2525 // Standard denom owners endpoint with path param
2626 bank_denom_owners : {
27- url : '/cosmos/bank/v1beta1/denom_owners/{denom} ' ,
27+ url : '/cosmos/bank/v1beta1/denom_owners_by_query ' ,
2828 adapter,
2929 } ,
3030 distribution_params : { url : '/cosmos/distribution/v1beta1/params' , adapter } ,
Original file line number Diff line number Diff line change @@ -126,9 +126,11 @@ export class CosmosRestClient extends BaseRestClient<RequestRegistry> {
126126 return supply ;
127127 }
128128 async getBankDenomOwners ( denom : string , limit = 100 , key ?: string ) {
129- let query = `?pagination.limit=${ limit } ` ;
129+ if ( ! denom ) throw new Error ( 'Denom is required' ) ;
130+
131+ let query = `?denom=${ denom } &pagination.limit=${ limit } ` ;
130132 if ( key ) query += `&pagination.key=${ encodeURIComponent ( key ) } ` ;
131- return this . request ( this . registry . bank_denom_owners , { denom } , query ) ;
133+ return this . request ( this . registry . bank_denom_owners , { } , query ) ;
132134 }
133135 // Distribution Module
134136 async getDistributionParams ( ) {
You can’t perform that action at this time.
0 commit comments