Mint: blink fix fee estimation (#439)

* blink: fix fee esimation

* fix line length

* fix line length

* fix line length

* remove noqa
This commit is contained in:
callebtc
2024-02-18 12:24:41 +01:00
committed by GitHub
parent 48158cd497
commit ad906df788
3 changed files with 13 additions and 3 deletions

View File

@@ -327,7 +327,7 @@ class BlinkWallet(LightningBackend):
fees_response_msat = int(resp["data"]["lnInvoiceFeeProbe"]["amount"]) * 1000
# we either take fee_msat_response or the BLINK_MAX_FEE_PERCENT, whichever is higher
fees_msat = max(
fees_response_msat, math.ceil(amount_msat * BLINK_MAX_FEE_PERCENT)
fees_response_msat, math.ceil(amount_msat / 100 * BLINK_MAX_FEE_PERCENT)
)
fees = Amount(unit=Unit.msat, amount=fees_msat)