diff --git a/cashu/wallet/wallet_deprecated.py b/cashu/wallet/wallet_deprecated.py index 34375a1..568538d 100644 --- a/cashu/wallet/wallet_deprecated.py +++ b/cashu/wallet/wallet_deprecated.py @@ -17,10 +17,10 @@ from ..core.base import ( GetInfoResponse, GetInfoResponse_deprecated, GetMintResponse_deprecated, - Invoice, KeysetsResponse_deprecated, PostMeltRequest_deprecated, PostMeltResponse_deprecated, + PostMintQuoteResponse, PostMintRequest_deprecated, PostMintResponse_deprecated, PostRestoreResponse, @@ -226,7 +226,7 @@ class LedgerAPIDeprecated(SupportsHttpxClient, SupportsMintURL): @async_set_httpx_client @async_ensure_mint_loaded_deprecated - async def request_mint_deprecated(self, amount) -> Invoice: + async def request_mint_deprecated(self, amount) -> PostMintQuoteResponse: """Requests a mint from the server and returns Lightning invoice. Args: @@ -244,12 +244,11 @@ class LedgerAPIDeprecated(SupportsHttpxClient, SupportsMintURL): return_dict = resp.json() mint_response = GetMintResponse_deprecated.parse_obj(return_dict) decoded_invoice = bolt11.decode(mint_response.pr) - return Invoice( - amount=amount, - bolt11=mint_response.pr, - id=mint_response.hash, - payment_hash=decoded_invoice.payment_hash, - out=False, + return PostMintQuoteResponse( + quote=mint_response.hash, + request=mint_response.pr, + paid=False, + expiry=decoded_invoice.date + (decoded_invoice.expiry or 0), ) @async_set_httpx_client