Skip to content

Commit

Permalink
Merge pull request #58 from LN-Zap/fix/fee-min-filter
Browse files Browse the repository at this point in the history
Fix formatting issues
  • Loading branch information
mrfelton authored Apr 23, 2024
2 parents af8466c + c291fe4 commit f814142
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/DataProviderManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class DataProviderManager {
Object.entries(feeEstimates).map(([key, value]) => [
key,
Math.round((value + Number.EPSILON) * 1000) / 1000,
])
]),
);

return {
Expand Down Expand Up @@ -206,9 +206,9 @@ export class DataProviderManager {
keys.forEach((key) => {
// Only add the estimate if it has a higher confirmation target and a lower fee.
if (
(Object.keys(mergedEstimates).length === 0) ||
Object.keys(mergedEstimates).length === 0 ||
(key > Math.max(...Object.keys(mergedEstimates).map(Number)) &&
estimates[key] < Math.min(...Object.values(mergedEstimates)))
estimates[key] < Math.min(...Object.values(mergedEstimates)))
) {
log.debug({
msg: `Adding estimate from ${providerName} with target ${key} and fee ${estimates[key]} to mergedEstimates`,
Expand Down

0 comments on commit f814142

Please sign in to comment.