mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 18:44:20 +01:00
Mint: lookup internal quote settlement by request (#478)
This commit is contained in:
@@ -155,10 +155,10 @@ class LedgerCrud(ABC):
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def get_mint_quote_by_checking_id(
|
||||
async def get_mint_quote_by_request(
|
||||
self,
|
||||
*,
|
||||
checking_id: str,
|
||||
request: str,
|
||||
db: Database,
|
||||
conn: Optional[Connection] = None,
|
||||
) -> Optional[MintQuote]:
|
||||
@@ -403,19 +403,19 @@ class LedgerCrudSqlite(LedgerCrud):
|
||||
)
|
||||
return MintQuote.from_row(row) if row else None
|
||||
|
||||
async def get_mint_quote_by_checking_id(
|
||||
async def get_mint_quote_by_request(
|
||||
self,
|
||||
*,
|
||||
checking_id: str,
|
||||
request: str,
|
||||
db: Database,
|
||||
conn: Optional[Connection] = None,
|
||||
) -> Optional[MintQuote]:
|
||||
row = await (conn or db).fetchone(
|
||||
f"""
|
||||
SELECT * from {table_with_schema(db, 'mint_quotes')}
|
||||
WHERE checking_id = ?
|
||||
WHERE request = ?
|
||||
""",
|
||||
(checking_id,),
|
||||
(request,),
|
||||
)
|
||||
return MintQuote.from_row(row) if row else None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user