mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-23 23:55:02 +01:00
Add global max fee amount
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user