fix PaymentKwargs class for mypy

This commit is contained in:
dni 2022-07-20 09:45:08 +02:00
parent 56560fca02
commit 704b572349

View file

@ -109,18 +109,15 @@ async def pay_invoice(
raise ValueError("Amount in invoice is too high.") raise ValueError("Amount in invoice is too high.")
# put all parameters that don't change here # put all parameters that don't change here
PaymentKwargs = TypedDict( class PaymentKwargs(TypedDict):
"PaymentKwargs", wallet_id: str
{ payment_request: str
"wallet_id": str, payment_hash: str
"payment_request": str, amount: int
"payment_hash": str, memo: str
"amount": int, extra: Optional[Dict]
"memo": str,
"extra": Optional[Dict], payment_kwargs: PaymentKwargs = PaymentKwargs(
},
)
payment_kwargs: PaymentKwargs = dict(
wallet_id=wallet_id, wallet_id=wallet_id,
payment_request=payment_request, payment_request=payment_request,
payment_hash=invoice.payment_hash, payment_hash=invoice.payment_hash,