Skip to content

Commit

Permalink
make MINIMUM_FEE_MSAT a const
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Feb 18, 2024
1 parent 7f330d8 commit e5d5940
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cashu/lightning/blink.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
DIRECTION_SEND = "SEND"
DIRECTION_RECEIVE = "RECEIVE"
PROBE_FEE_TIMEOUT_SEC = 1
MINIMUM_FEE_MSAT = 2000


class BlinkWallet(LightningBackend):
Expand Down Expand Up @@ -394,7 +395,7 @@ async def get_payment_quote(self, bolt11: str) -> PaymentQuoteResponse:
# we take the highest: fee_msat_response, or BLINK_MAX_FEE_PERCENT, or 2000 msat
fees_msat = max(
fees_response_msat,
max(math.ceil(amount_msat / 100 * BLINK_MAX_FEE_PERCENT), 2000),
max(math.ceil(amount_msat / 100 * BLINK_MAX_FEE_PERCENT), MINIMUM_FEE_MSAT),
)

fees = Amount(unit=Unit.msat, amount=fees_msat)
Expand Down

0 comments on commit e5d5940

Please sign in to comment.