feat: add wallet check

This commit is contained in:
Vlad Stan 2022-10-07 11:18:17 +03:00
parent 33212e0b73
commit b27d31b381

View file

@ -218,7 +218,11 @@ async def keys(
@cashu_ext.get("/api/v1/mint/{cashu_id}")
async def mint_pay_request(amount: int = 0, cashu_id: str = Query(None)):
async def mint_pay_request(
amount: int = 0,
cashu_id: str = Query(None),
wallet: WalletTypeInfo = Depends(get_key_type),
):
"""Request minting of tokens. Server responds with a Lightning invoice."""
cashu = await get_cashu(cashu_id)
@ -252,6 +256,7 @@ async def mint_coins(
payloads: MintPayloads,
payment_hash: Union[str, None] = None,
cashu_id: str = Query(None),
wallet: WalletTypeInfo = Depends(get_key_type),
):
"""
Requests the minting of tokens belonging to a paid payment request.