diff --git a/backend/src/api/fee-api.ts b/backend/src/api/fee-api.ts index 2ad9744d2..4e20d9c06 100644 --- a/backend/src/api/fee-api.ts +++ b/backend/src/api/fee-api.ts @@ -1,5 +1,6 @@ import config from '../config'; import { MempoolBlock } from '../mempool.interfaces'; +import mempool from './mempool'; import projectedBlocks from './mempool-blocks'; class FeeApi { @@ -9,12 +10,14 @@ class FeeApi { public getRecommendedFee() { const pBlocks = projectedBlocks.getMempoolBlocks(); + const mPool = mempool.getMempoolInfo(); if (!pBlocks.length) { return { 'fastestFee': this.defaultFee, 'halfHourFee': this.defaultFee, 'hourFee': this.defaultFee, + 'mempoolminfee': mPool.mempoolminfee, }; } @@ -26,6 +29,7 @@ class FeeApi { 'fastestFee': firstMedianFee, 'halfHourFee': secondMedianFee, 'hourFee': thirdMedianFee, + 'mempoolminfee': mPool.mempoolminfee, }; } diff --git a/backend/src/api/mempool.ts b/backend/src/api/mempool.ts index 83367a6ac..58e58e6dd 100644 --- a/backend/src/api/mempool.ts +++ b/backend/src/api/mempool.ts @@ -62,7 +62,7 @@ class Mempool { this.mempoolInfo = await bitcoinBaseApi.$getMempoolInfo(); } - public getMempoolInfo(): IBitcoinApi.MempoolInfo | undefined { + public getMempoolInfo(): IBitcoinApi.MempoolInfo { return this.mempoolInfo; }