Default to 1 sat/vB when mempool is empty.
This commit is contained in:
		
							parent
							
								
									09b1a0d430
								
							
						
					
					
						commit
						d2a14e9cb7
					
				@ -18,8 +18,8 @@ class FeeApi {
 | 
				
			|||||||
      firstMedianFee = 1;
 | 
					      firstMedianFee = 1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const secondMedianFee = pBlocks[1] ? Math.ceil(pBlocks[1].medianFee) : firstMedianFee;
 | 
					    const secondMedianFee = pBlocks[1] ? Math.ceil(pBlocks[1].medianFee) : 1;
 | 
				
			||||||
    const thirdMedianFee = pBlocks[2] ? Math.ceil(pBlocks[2].medianFee) : secondMedianFee;
 | 
					    const thirdMedianFee = pBlocks[2] ? Math.ceil(pBlocks[2].medianFee) : 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      'fastestFee': firstMedianFee,
 | 
					      'fastestFee': firstMedianFee,
 | 
				
			||||||
 | 
				
			|||||||
@ -35,8 +35,8 @@ export class FeesBoxComponent implements OnInit {
 | 
				
			|||||||
            firstMedianFee = 1;
 | 
					            firstMedianFee = 1;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          const secondMedianFee = pBlocks[1] ? Math.ceil(pBlocks[1].medianFee) : firstMedianFee;
 | 
					          const secondMedianFee = pBlocks[1] ? Math.ceil(pBlocks[1].medianFee) : 1;
 | 
				
			||||||
          const thirdMedianFee = pBlocks[2] ? Math.ceil(pBlocks[2].medianFee) : secondMedianFee;
 | 
					          const thirdMedianFee = pBlocks[2] ? Math.ceil(pBlocks[2].medianFee) : 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          return {
 | 
					          return {
 | 
				
			||||||
            'fastestFee': firstMedianFee,
 | 
					            'fastestFee': firstMedianFee,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user