mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 10:34:20 +01:00
[Wallet] API: optional amount in InvoiceResponse (#236)
* fix missing value in InvoiceResponse API * wallet api: optional amount in invoiceresponse * skip tor test again
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from typing import Dict, List, Union
|
from typing import Dict, List, Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
@@ -14,23 +14,23 @@ class PayResponse(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class InvoiceResponse(BaseModel):
|
class InvoiceResponse(BaseModel):
|
||||||
amount: int
|
amount: Optional[int] = None
|
||||||
invoice: Union[Invoice, None] = None
|
invoice: Optional[Invoice] = None
|
||||||
hash: Union[str, None] = None
|
hash: Optional[str] = None
|
||||||
initial_balance: int
|
initial_balance: int
|
||||||
balance: int
|
balance: int
|
||||||
|
|
||||||
|
|
||||||
class BalanceResponse(BaseModel):
|
class BalanceResponse(BaseModel):
|
||||||
balance: int
|
balance: int
|
||||||
keysets: Union[Dict, None] = None
|
keysets: Optional[Dict] = None
|
||||||
mints: Union[Dict, None] = None
|
mints: Optional[Dict] = None
|
||||||
|
|
||||||
|
|
||||||
class SendResponse(BaseModel):
|
class SendResponse(BaseModel):
|
||||||
balance: int
|
balance: int
|
||||||
token: str
|
token: str
|
||||||
npub: Union[str, None] = None
|
npub: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
class ReceiveResponse(BaseModel):
|
class ReceiveResponse(BaseModel):
|
||||||
@@ -47,7 +47,7 @@ class PendingResponse(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class LockResponse(BaseModel):
|
class LockResponse(BaseModel):
|
||||||
P2SH: Union[str, None]
|
P2SH: Optional[str]
|
||||||
|
|
||||||
|
|
||||||
class LocksResponse(BaseModel):
|
class LocksResponse(BaseModel):
|
||||||
@@ -68,8 +68,8 @@ class InfoResponse(BaseModel):
|
|||||||
debug: bool
|
debug: bool
|
||||||
cashu_dir: str
|
cashu_dir: str
|
||||||
mint_url: str
|
mint_url: str
|
||||||
settings: Union[str, None]
|
settings: Optional[str]
|
||||||
tor: bool
|
tor: bool
|
||||||
nostr_public_key: Union[str, None] = None
|
nostr_public_key: Optional[str] = None
|
||||||
nostr_relays: List[str] = []
|
nostr_relays: List[str] = []
|
||||||
socks_proxy: Union[str, None] = None
|
socks_proxy: Optional[str] = None
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import requests
|
|||||||
from cashu.tor.tor import TorProxy
|
from cashu.tor.tor import TorProxy
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="Tor is not installed on CI")
|
||||||
def test_tor_setup():
|
def test_tor_setup():
|
||||||
s = requests.Session()
|
s = requests.Session()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user