Skip to content

Commit

Permalink
fix: fakewallet payment fee unit
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Mar 23, 2024
1 parent adeec00 commit 1d6c637
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cashu/lightning/fake.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def pay_invoice(self, quote: MeltQuote, fee_limit: int) -> PaymentResponse
return PaymentResponse(
ok=True,
checking_id=invoice.payment_hash,
fee=Amount(unit=Unit.msat, amount=0),
fee=Amount(unit=self.unit, amount=1),
preimage=self.payment_secrets.get(invoice.payment_hash) or "0" * 64,
)
else:
Expand Down Expand Up @@ -164,7 +164,7 @@ async def get_payment_quote(self, bolt11: str) -> PaymentQuoteResponse:
elif self.unit == Unit.usd:
amount_usd = math.ceil(invoice_obj.amount_msat / 1e9 * self.fake_btc_price)
amount = Amount(unit=Unit.usd, amount=amount_usd)
fees = Amount(unit=Unit.usd, amount=1)
fees = Amount(unit=Unit.usd, amount=2)
else:
raise NotImplementedError()

Expand Down

0 comments on commit 1d6c637

Please sign in to comment.