mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-23 22:47:05 +01:00
Translate expiry to expirySeconds for Phoenixd (#2901)
This commit is contained in:
parent
cc33a49b12
commit
73e716085b
1 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,7 @@ import base64
|
|||
import hashlib
|
||||
import json
|
||||
import urllib.parse
|
||||
from typing import AsyncGenerator, Dict, Optional
|
||||
from typing import Any, AsyncGenerator, Dict, Optional
|
||||
|
||||
import httpx
|
||||
from loguru import logger
|
||||
|
@ -100,7 +100,7 @@ class PhoenixdWallet(Wallet):
|
|||
|
||||
try:
|
||||
msats_amount = amount
|
||||
data: Dict = {
|
||||
data: Dict[str, Any] = {
|
||||
"amountSat": f"{msats_amount}",
|
||||
"externalId": "",
|
||||
}
|
||||
|
@ -119,6 +119,9 @@ class PhoenixdWallet(Wallet):
|
|||
else:
|
||||
data["description"] = desc
|
||||
|
||||
# if expiry is not set, it defaults to 3600 seconds (1 hour)
|
||||
data["expirySeconds"] = int(kwargs.get("expiry", 3600))
|
||||
|
||||
r = await self.client.post(
|
||||
"/createinvoice",
|
||||
data=data,
|
||||
|
|
Loading…
Add table
Reference in a new issue