@@ -54,8 +54,8 @@ export class BlockHttp extends Http implements BlockRepository {
5454 * @param height - Block height
5555 * @returns Observable<BlockInfo>
5656 */
57- public getBlockByHeight ( height : string ) : Observable < BlockInfo > {
58- return observableFrom ( this . blockRoutesApi . getBlockByHeight ( height ) ) . pipe (
57+ public getBlockByHeight ( height : UInt64 ) : Observable < BlockInfo > {
58+ return observableFrom ( this . blockRoutesApi . getBlockByHeight ( height . toString ( ) ) ) . pipe (
5959 map ( ( { body} ) => this . toBlockInfo ( body ) ) ,
6060 catchError ( ( error ) => throwError ( this . errorHandling ( error ) ) ) ,
6161 ) ;
@@ -67,10 +67,10 @@ export class BlockHttp extends Http implements BlockRepository {
6767 * @param queryParams - (Optional) Query params
6868 * @returns Observable<Transaction[]>
6969 */
70- public getBlockTransactions ( height : string ,
70+ public getBlockTransactions ( height : UInt64 ,
7171 queryParams ?: QueryParams ) : Observable < Transaction [ ] > {
7272 return observableFrom (
73- this . blockRoutesApi . getBlockTransactions ( height ,
73+ this . blockRoutesApi . getBlockTransactions ( height . toString ( ) ,
7474 this . queryParams ( queryParams ) . pageSize ,
7575 this . queryParams ( queryParams ) . id ,
7676 this . queryParams ( queryParams ) . order ) )
@@ -87,9 +87,9 @@ export class BlockHttp extends Http implements BlockRepository {
8787 * @param limit - Number of blocks returned.
8888 * @returns Observable<BlockInfo[]>
8989 */
90- public getBlocksByHeightWithLimit ( height : string , limit : number ) : Observable < BlockInfo [ ] > {
90+ public getBlocksByHeightWithLimit ( height : UInt64 , limit : number ) : Observable < BlockInfo [ ] > {
9191 return observableFrom (
92- this . blockRoutesApi . getBlocksByHeightWithLimit ( height , limit ) ) . pipe (
92+ this . blockRoutesApi . getBlocksByHeightWithLimit ( height . toString ( ) , limit ) ) . pipe (
9393 map ( ( { body} ) => body . map ( ( blockDTO ) => this . toBlockInfo ( blockDTO ) ) ) ,
9494 catchError ( ( error ) => throwError ( this . errorHandling ( error ) ) ) ,
9595 ) ;
@@ -136,9 +136,9 @@ export class BlockHttp extends Http implements BlockRepository {
136136 * @param hash The hash of the transaction.
137137 * @return Observable<MerkleProofInfo>
138138 */
139- public getMerkleTransaction ( height : string , hash : string ) : Observable < MerkleProofInfo > {
139+ public getMerkleTransaction ( height : UInt64 , hash : string ) : Observable < MerkleProofInfo > {
140140 return observableFrom (
141- this . blockRoutesApi . getMerkleTransaction ( height , hash ) ) . pipe (
141+ this . blockRoutesApi . getMerkleTransaction ( height . toString ( ) , hash ) ) . pipe (
142142 map ( ( { body} ) => new MerkleProofInfo (
143143 body . merklePath ! . map ( ( payload ) => new MerklePathItem ( payload . position , payload . hash ) ) ,
144144 ) ) ,
0 commit comments