mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 10:34:20 +01:00
Fix: Nut 05 mint response model (#564)
* change response model of NUT-05 to include payment_preimage and change (NUT-08) * fix tests * crud: same expiry as timestamp * fix expiry handling * add api tests to check new models
This commit is contained in:
@@ -357,11 +357,12 @@ async def test_melt_with_more_inputs_than_invoice(wallet1: Wallet, ledger: Ledge
|
||||
|
||||
# make sure we have more inputs than the melt quote needs
|
||||
assert sum_proofs(wallet1.proofs) >= melt_quote.amount + melt_quote.fee_reserve
|
||||
payment_proof, return_outputs = await ledger.melt(
|
||||
melt_resp = await ledger.melt(
|
||||
proofs=wallet1.proofs, quote=melt_quote.quote, outputs=outputs
|
||||
)
|
||||
# we get 2 sats back because we overpaid
|
||||
assert sum([o.amount for o in return_outputs]) == 2
|
||||
assert melt_resp.change
|
||||
assert sum([o.amount for o in melt_resp.change]) == 2
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user