refactor: extract create_payment_request (#3240)

This commit is contained in:
Vlad Stan
2025-07-15 11:14:18 +02:00
committed by dni ⚡
parent 90ab642dcd
commit 09b91f9f79
3 changed files with 16 additions and 6 deletions
+2 -6
View File
@@ -62,8 +62,7 @@ from ..crud import (
get_wallet_for_key,
)
from ..services import (
create_fiat_invoice,
create_wallet_invoice,
create_payment_request,
fee_reserve_total,
get_payments_daily_stats,
pay_invoice,
@@ -261,10 +260,7 @@ async def api_payments_create(
)
# If the payment is not outgoing, we can create a new invoice.
if invoice_data.fiat_provider:
return await create_fiat_invoice(wallet_id, invoice_data)
return await create_wallet_invoice(wallet_id, invoice_data)
return await create_payment_request(wallet_id, invoice_data)
@payment_router.get("/fee-reserve")