* small fastapi convertion * make tip add up to invoice * make tip add to invoice * display existing tpos * clean console logs * suggestion from @leesalminen * blacked
This commit is contained in:
@@ -17,7 +17,7 @@ from .models import CreateTposData
|
||||
|
||||
@tpos_ext.get("/api/v1/tposs", status_code=HTTPStatus.OK)
|
||||
async def api_tposs(
|
||||
all_wallets: bool = Query(None), wallet: WalletTypeInfo = Depends(get_key_type)
|
||||
all_wallets: bool = Query(False), wallet: WalletTypeInfo = Depends(get_key_type)
|
||||
):
|
||||
wallet_ids = [wallet.wallet.id]
|
||||
if all_wallets:
|
||||
@@ -63,6 +63,9 @@ async def api_tpos_create_invoice(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail="TPoS does not exist."
|
||||
)
|
||||
|
||||
if tipAmount:
|
||||
amount += tipAmount
|
||||
|
||||
try:
|
||||
payment_hash, payment_request = await create_invoice(
|
||||
wallet_id=tpos.wallet,
|
||||
|
||||
Reference in New Issue
Block a user