Handle 0.1 sat/vB base fee on the dashboard and backend.
This commit is contained in:
		
							parent
							
								
									d432696c67
								
							
						
					
					
						commit
						5cdcf277e4
					
				@ -1,5 +1,5 @@
 | 
			
		||||
import { CpfpInfo, TransactionExtended, TransactionStripped } from '../mempool.interfaces';
 | 
			
		||||
 | 
			
		||||
import config from '../config';
 | 
			
		||||
export class Common {
 | 
			
		||||
  static median(numbers: number[]) {
 | 
			
		||||
    let medianNr = 0;
 | 
			
		||||
@ -105,7 +105,7 @@ export class Common {
 | 
			
		||||
      totalFees += tx.bestDescendant.fee;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    tx.effectiveFeePerVsize = Math.max(1, totalFees / (totalWeight / 4));
 | 
			
		||||
    tx.effectiveFeePerVsize = Math.max(config.MEMPOOL.NETWORK === 'liquid' ? 0.1 : 1, totalFees / (totalWeight / 4));
 | 
			
		||||
    tx.cpfpChecked = true;
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import bitcoinApi from './bitcoin/bitcoin-api-factory';
 | 
			
		||||
import logger from '../logger';
 | 
			
		||||
import { TransactionExtended, TransactionMinerInfo } from '../mempool.interfaces';
 | 
			
		||||
import { IEsploraApi } from './bitcoin/esplora-api.interface';
 | 
			
		||||
import config from '../config';
 | 
			
		||||
 | 
			
		||||
class TransactionUtils {
 | 
			
		||||
  constructor() { }
 | 
			
		||||
@ -31,7 +31,7 @@ class TransactionUtils {
 | 
			
		||||
      // @ts-ignore
 | 
			
		||||
      return transaction;
 | 
			
		||||
    }
 | 
			
		||||
    const feePerVbytes = Math.max(1, (transaction.fee || 0) / (transaction.weight / 4));
 | 
			
		||||
    const feePerVbytes = Math.max(config.MEMPOOL.NETWORK === 'liquid' ? 0.1 : 1, (transaction.fee || 0) / (transaction.weight / 4));
 | 
			
		||||
    const transactionExtended: TransactionExtended = Object.assign({
 | 
			
		||||
      vsize: Math.round(transaction.weight / 4),
 | 
			
		||||
      feePerVsize: feePerVbytes,
 | 
			
		||||
 | 
			
		||||
@ -165,7 +165,7 @@
 | 
			
		||||
<ng-template #mempoolTable let-mempoolInfoData>
 | 
			
		||||
  <div class="mempool-info-data">
 | 
			
		||||
    <div class="item">
 | 
			
		||||
      <h5 *ngIf="!mempoolInfoData.value || mempoolInfoData.value.memPoolInfo.mempoolminfee === 0.00001 else purgingText" class="card-title" i18n="dashboard.minimum-fee|Minimum mempool fee">Minimum fee</h5>
 | 
			
		||||
      <h5 *ngIf="!mempoolInfoData.value || mempoolInfoData.value.memPoolInfo.mempoolminfee === 0.00001 || (stateService.env.BASE_MODULE === 'liquid' && mempoolInfoData.value.memPoolInfo.mempoolminfee === 0.000001) else purgingText" class="card-title" i18n="dashboard.minimum-fee|Minimum mempool fee">Minimum fee</h5>
 | 
			
		||||
      <ng-template #purgingText><h5 class="card-title" i18n="dashboard.purging|Purgin below fee">Purging</h5></ng-template>
 | 
			
		||||
      <p class="card-text" *ngIf="(isLoadingWebSocket$ | async) === false && mempoolInfoData.value; else loading">
 | 
			
		||||
        <ng-template [ngIf]="mempoolInfoData.value.memPoolInfo.mempoolminfee > 0.00001">< </ng-template>{{ mempoolInfoData.value.memPoolInfo.mempoolminfee * 100000 | number : '1.1-1' }} <span><ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container></span>
 | 
			
		||||
 | 
			
		||||
@ -66,7 +66,7 @@ export class DashboardComponent implements OnInit {
 | 
			
		||||
 | 
			
		||||
  constructor(
 | 
			
		||||
    @Inject(LOCALE_ID) private locale: string,
 | 
			
		||||
    private stateService: StateService,
 | 
			
		||||
    public stateService: StateService,
 | 
			
		||||
    private apiService: ApiService,
 | 
			
		||||
    private websocketService: WebsocketService,
 | 
			
		||||
    private seoService: SeoService,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user