remove update_payment_status/extra/details
This commit is contained in:
+5
-2
@@ -22,8 +22,9 @@ from lnbits.core.crud import (
|
||||
delete_account,
|
||||
get_account,
|
||||
get_account_by_username,
|
||||
get_payment,
|
||||
get_user,
|
||||
update_payment_status,
|
||||
update_payment,
|
||||
)
|
||||
from lnbits.core.models import Account, CreateInvoice, PaymentState, User
|
||||
from lnbits.core.services import create_user_account, update_wallet_balance
|
||||
@@ -265,7 +266,9 @@ async def fake_payments(client, adminkey_headers_from):
|
||||
assert response.is_success
|
||||
data = response.json()
|
||||
assert data["checking_id"]
|
||||
await update_payment_status(data["checking_id"], status=PaymentState.SUCCESS)
|
||||
payment = await get_payment(data["checking_id"])
|
||||
payment.status = PaymentState.SUCCESS
|
||||
await update_payment(payment)
|
||||
|
||||
params = {"time[ge]": ts, "time[le]": time()}
|
||||
return fake_data, params
|
||||
|
||||
@@ -4,7 +4,7 @@ import hashlib
|
||||
import pytest
|
||||
|
||||
from lnbits import bolt11
|
||||
from lnbits.core.crud import get_standalone_payment, update_payment_details
|
||||
from lnbits.core.crud import get_standalone_payment, update_payment
|
||||
from lnbits.core.models import CreateInvoice, Payment, PaymentState
|
||||
from lnbits.core.services import fee_reserve_total, get_balance_delta
|
||||
from lnbits.tasks import create_task, wait_for_paid_invoices
|
||||
@@ -303,7 +303,8 @@ async def test_receive_real_invoice_set_pending_and_check_state(
|
||||
assert payment
|
||||
|
||||
# set the incoming invoice to pending
|
||||
await update_payment_details(payment.checking_id, status=PaymentState.PENDING)
|
||||
payment.status = PaymentState.PENDING
|
||||
await update_payment(payment)
|
||||
|
||||
payment_pending = await get_standalone_payment(
|
||||
invoice["payment_hash"], incoming=True
|
||||
|
||||
Reference in New Issue
Block a user