Add global max fee amount

This commit is contained in:
Michael Bumann
2023-06-30 12:02:54 +02:00
parent c9b394f156
commit 2c6db09abc
2 changed files with 4 additions and 0 deletions

View File

@@ -142,6 +142,9 @@ func (svc *LndhubService) CalcFeeLimit(destination string, amount int64) int64 {
if amount > 1000 {
limit = int64(math.Ceil(float64(amount)*float64(0.01)) + 1)
}
if amount > svc.Config.MaxFeeAmount {
return svc.Config.MaxFeeAmount
}
return limit
}