File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed 
packages/js-dapi-client/lib/methods/core Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function subscribeToTransactionsWithProofsFactory(grpcTransport) {
3939      ...options , 
4040    } ; 
4141
42-     if  ( options . fromBlockHeight  ===  0 )  { 
42+     if  ( 'fromBlockHeight'   in   options   &&   options . fromBlockHeight  ===  0 )  { 
4343      throw  new  DAPIClientError ( 'Invalid argument: minimum value for `fromBlockHeight` is 1' ) ; 
4444    } 
4545
@@ -59,14 +59,14 @@ function subscribeToTransactionsWithProofsFactory(grpcTransport) {
5959    const  request  =  new  TransactionsWithProofsRequest ( ) ; 
6060    request . setBloomFilter ( bloomFilterMessage ) ; 
6161
62-     if  ( options . fromBlockHeight  !==  undefined )  { 
63-       request . setFromBlockHeight ( options . fromBlockHeight ) ; 
64-     } 
65- 
66-     if  ( options . fromBlockHash )  { 
62+     if  ( 'fromBlockHash'  in  options )  { 
6763      request . setFromBlockHash ( 
68-         Buffer . from ( options . fromBlockHash ,  'hex' ) , 
64+         Buffer . isBuffer ( options . fromBlockHash ) 
65+           ? options . fromBlockHash 
66+           : Buffer . from ( options . fromBlockHash ,  'hex' ) , 
6967      ) ; 
68+     }  else  if  ( 'fromBlockHeight'  in  options )  { 
69+       request . setFromBlockHeight ( options . fromBlockHeight ) ; 
7070    } 
7171
7272    request . setCount ( options . count ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments