Refactoring the Liquid and LiquidTestnet check to a common function.

This commit is contained in:
softsimon
2021-12-31 02:28:40 +04:00
parent 10c4e47091
commit 6ab79b3c35
5 changed files with 18 additions and 12 deletions

View File

@@ -1,12 +1,13 @@
import config from '../config';
import { MempoolBlock } from '../mempool.interfaces';
import { Common } from './common';
import mempool from './mempool';
import projectedBlocks from './mempool-blocks';
class FeeApi {
constructor() { }
defaultFee = config.MEMPOOL.NETWORK === 'liquid' || config.MEMPOOL.NETWORK === 'liquidtestnet' ? 0.1 : 1;
defaultFee = Common.isLiquid() ? 0.1 : 1;
public getRecommendedFee() {
const pBlocks = projectedBlocks.getMempoolBlocks();