File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,15 +215,22 @@ export function getBlocksParams({
215215 nonce,
216216 epoch,
217217 proposer,
218- withProposerIdentity = true
218+ withProposerIdentity = true ,
219+
220+ // not on api
221+ isCount = false
219222} : GetBlocksType ) {
220223 const params : AdapterProviderPropsType [ 'params' ] = {
221- ...getPageParams ( { page, size } ) ,
224+ ...( isCount
225+ ? { }
226+ : {
227+ ...getPageParams ( { page, size } ) ,
228+ ...( withProposerIdentity ? { withProposerIdentity } : { } ) ,
229+ ...( fields !== undefined ? { fields } : { } )
230+ } ) ,
222231 ...( proposer ? { proposer } : { } ) ,
223- ...( withProposerIdentity ? { withProposerIdentity } : { } ) ,
224- ...getShardAndEpochParams ( shard , epoch ) ,
225232 ...( nonce !== undefined ? { nonce } : { } ) ,
226- ...( fields !== undefined ? { fields } : { } )
233+ ...getShardAndEpochParams ( shard , epoch )
227234 } ;
228235
229236 return params ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export const useBlockRequests = () => {
3737 url : '/blocks/c' ,
3838 signal,
3939 timeout,
40- params : getBlocksParams ( params )
40+ params : getBlocksParams ( { isCount : true , ... params } )
4141 } ) ,
4242
4343 /* Miniblocks */
You can’t perform that action at this time.
0 commit comments