Skip to content

Commit

Permalink
fix regtest
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Nov 21, 2023
1 parent 7d79d18 commit 4704b40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cashu/lightning/lnbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse
return PaymentResponse(
ok=True,
checking_id=checking_id,
fee_msat=payment.fee_msat,
fee=payment.fee,
preimage=payment.preimage,
)

Expand Down Expand Up @@ -148,7 +148,7 @@ async def get_payment_status(self, checking_id: str) -> PaymentStatus:

return PaymentStatus(
paid=data["paid"],
fee_msat=data["details"]["fee"],
fee=Amount(unit=Unit.msat, amount=data["details"]["fee"]),
preimage=data["preimage"],
)

Expand Down
2 changes: 1 addition & 1 deletion cashu/lightning/lndrest.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def create_invoice(
) -> InvoiceResponse:
self.assert_unit_supported(amount.unit)
data: Dict = {
"value": amount.to(Unit.msat, round="up").amount,
"value": amount.to(Unit.sat).amount,
"private": True,
"memo": memo or "",
}
Expand Down
4 changes: 2 additions & 2 deletions cashu/lightning/strike.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse
states = {"PENDING": None, "COMPLETED": True, "FAILED": False}
if states[data.get("state")]:
return PaymentResponse(
ok=True, checking_id="", fee_msat=0, error_message=None
ok=True, checking_id=None, fee=None, error_message=None
)
else:
return PaymentResponse(
ok=False, checking_id="", fee_msat=0, error_message=None
ok=False, checking_id=None, fee=None, error_message=None
)

async def get_invoice_status(self, checking_id: str) -> PaymentStatus:
Expand Down

0 comments on commit 4704b40

Please sign in to comment.