Default to 1 sat/vB when mempool is empty.

This commit is contained in:
softsimon 2020-08-10 22:04:51 +07:00
parent c447e39656
commit 2aaa421b3a
2 changed files with 4 additions and 4 deletions

View File

@ -18,8 +18,8 @@ class FeeApi {
firstMedianFee = 1; firstMedianFee = 1;
} }
const secondMedianFee = pBlocks[1] ? Math.ceil(pBlocks[1].medianFee) : firstMedianFee; const secondMedianFee = pBlocks[1] ? Math.ceil(pBlocks[1].medianFee) : 1;
const thirdMedianFee = pBlocks[2] ? Math.ceil(pBlocks[2].medianFee) : secondMedianFee; const thirdMedianFee = pBlocks[2] ? Math.ceil(pBlocks[2].medianFee) : 1;
return { return {
'fastestFee': firstMedianFee, 'fastestFee': firstMedianFee,

View File

@ -35,8 +35,8 @@ export class FeesBoxComponent implements OnInit {
firstMedianFee = 1; firstMedianFee = 1;
} }
const secondMedianFee = pBlocks[1] ? Math.ceil(pBlocks[1].medianFee) : firstMedianFee; const secondMedianFee = pBlocks[1] ? Math.ceil(pBlocks[1].medianFee) : 1;
const thirdMedianFee = pBlocks[2] ? Math.ceil(pBlocks[2].medianFee) : secondMedianFee; const thirdMedianFee = pBlocks[2] ? Math.ceil(pBlocks[2].medianFee) : 1;
return { return {
'fastestFee': firstMedianFee, 'fastestFee': firstMedianFee,