mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-11 04:34:20 +01:00
Token state check with Y (#468)
* Token state check with Y * remove backwards compat for v1
This commit is contained in:
@@ -54,7 +54,8 @@ async def test_api_keys(ledger: Ledger):
|
||||
"id": keyset.id,
|
||||
"unit": keyset.unit.name,
|
||||
"keys": {
|
||||
str(k): v.serialize().hex() for k, v in keyset.public_keys.items() # type: ignore
|
||||
str(k): v.serialize().hex()
|
||||
for k, v in keyset.public_keys.items() # type: ignore
|
||||
},
|
||||
}
|
||||
for keyset in ledger.keysets.values()
|
||||
@@ -378,7 +379,7 @@ async def test_melt_external(ledger: Ledger, wallet: Wallet):
|
||||
reason="settings.debug_mint_only_deprecated is set",
|
||||
)
|
||||
async def test_api_check_state(ledger: Ledger):
|
||||
payload = PostCheckStateRequest(secrets=["asdasdasd", "asdasdasd1"])
|
||||
payload = PostCheckStateRequest(Ys=["asdasdasd", "asdasdasd1"])
|
||||
response = httpx.post(
|
||||
f"{BASE_URL}/v1/checkstate",
|
||||
json=payload.dict(),
|
||||
|
||||
@@ -357,7 +357,5 @@ async def test_check_proof_state(wallet1: Wallet, ledger: Ledger):
|
||||
|
||||
keep_proofs, send_proofs = await wallet1.split_to_send(wallet1.proofs, 10)
|
||||
|
||||
proof_states = await ledger.check_proofs_state(
|
||||
secrets=[p.secret for p in send_proofs]
|
||||
)
|
||||
proof_states = await ledger.check_proofs_state(Ys=[p.Y for p in send_proofs])
|
||||
assert all([p.state.value == "UNSPENT" for p in proof_states])
|
||||
|
||||
Reference in New Issue
Block a user