fix PaymentKwargs class for mypy
This commit is contained in:
parent
045212a070
commit
e1d1ce7edc
1 changed files with 9 additions and 12 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue