mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-21 02:54:20 +01:00
Mint: settle mint-melt on same mint with different units externally (#651)
* WIP settle different units externally * mint melt externally different units * deprecated route return only sat * comment --------- Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import httpx
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from cashu.core.base import Proof
|
||||
from cashu.core.base import Proof, Unit
|
||||
from cashu.core.models import (
|
||||
CheckSpendableRequest_deprecated,
|
||||
CheckSpendableResponse_deprecated,
|
||||
@@ -51,7 +51,8 @@ async def test_api_keysets(ledger: Ledger):
|
||||
response = httpx.get(f"{BASE_URL}/keysets")
|
||||
assert response.status_code == 200, f"{response.url} {response.status_code}"
|
||||
assert ledger.keyset.public_keys
|
||||
assert response.json()["keysets"] == list(ledger.keysets.keys())
|
||||
sat_keysets = {k: v for k, v in ledger.keysets.items() if v.unit == Unit.sat}
|
||||
assert response.json()["keysets"] == list(sat_keysets.keys())
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user