NUT-04 and NUT-05: Add state field to quotes (#560)

* wip adding states, tests failing

* add state field to quotes

* responses from quotes

* store correct state

* cleaner test

* fix swap check

* oops
This commit is contained in:
callebtc
2024-06-26 03:06:01 +02:00
committed by GitHub
parent e846acf946
commit 6b38ef6c29
26 changed files with 330 additions and 84 deletions

View File

@@ -3,7 +3,7 @@ import httpx
import pytest
import pytest_asyncio
from cashu.core.base import SpentState
from cashu.core.base import ProofSpentState
from cashu.core.models import (
GetInfoResponse,
MintMeltMethodSetting,
@@ -403,7 +403,7 @@ async def test_api_check_state(ledger: Ledger):
response = PostCheckStateResponse.parse_obj(response.json())
assert response
assert len(response.states) == 2
assert response.states[0].state == SpentState.unspent
assert response.states[0].state == ProofSpentState.unspent
@pytest.mark.asyncio