Renaming feeApi minimumFee and display as rounded satoshis.

This commit is contained in:
softsimon 2021-02-24 14:39:34 +07:00
parent ea5dc8738c
commit 04c42b82f4
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -11,13 +11,14 @@ class FeeApi {
public getRecommendedFee() { public getRecommendedFee() {
const pBlocks = projectedBlocks.getMempoolBlocks(); const pBlocks = projectedBlocks.getMempoolBlocks();
const mPool = mempool.getMempoolInfo(); const mPool = mempool.getMempoolInfo();
const minimumFee = Math.ceil(mPool.mempoolminfee * 100000);
if (!pBlocks.length) { if (!pBlocks.length) {
return { return {
'fastestFee': this.defaultFee, 'fastestFee': this.defaultFee,
'halfHourFee': this.defaultFee, 'halfHourFee': this.defaultFee,
'hourFee': this.defaultFee, 'hourFee': this.defaultFee,
'mempoolminfee': mPool.mempoolminfee, 'minimumFee': minimumFee,
}; };
} }
@ -29,7 +30,7 @@ class FeeApi {
'fastestFee': firstMedianFee, 'fastestFee': firstMedianFee,
'halfHourFee': secondMedianFee, 'halfHourFee': secondMedianFee,
'hourFee': thirdMedianFee, 'hourFee': thirdMedianFee,
'mempoolminfee': mPool.mempoolminfee, 'minimumFee': minimumFee,
}; };
} }