Fix halving calculation
This commit is contained in:
		
							parent
							
								
									d45f3c32cf
								
							
						
					
					
						commit
						84ef424752
					
				@ -98,7 +98,7 @@ export class DifficultyComponent implements OnInit {
 | 
			
		||||
            colorPreviousAdjustments = '#ffffff66';
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          const blocksUntilHalving = block.height % 210000;
 | 
			
		||||
          const blocksUntilHalving = 210000 - (block.height % 210000);
 | 
			
		||||
          const timeUntilHalving = (blocksUntilHalving * timeAvgMins * 60 * 1000) + (now * 1000);
 | 
			
		||||
 | 
			
		||||
          return {
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,7 @@
 | 
			
		||||
    <div class="col">
 | 
			
		||||
      <div class="main-title" i18n="dashboard.difficulty-adjustment">Difficulty Adjustment</div>
 | 
			
		||||
      <div class="card" style="height: 123px">
 | 
			
		||||
        <app-difficulty [showTitle]="false"></app-difficulty>
 | 
			
		||||
        <app-difficulty [showTitle]="false" [showProgress]="false" [showHalving]="true"></app-difficulty>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user