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