mirror of
https://github.com/lnbits/lnbits.git
synced 2025-08-03 07:22:28 +02:00
refactor: add status column to apipayments (#2537)
* refactor: add status column to apipayments keep track of the payment status with an enum and persist it as string to db. `pending`, `success`, `failed`. - database migration - remove deleting of payments, failed payments stay
This commit is contained in:
@@ -55,8 +55,8 @@ cursor.execute(
|
||||
"""
|
||||
INSERT INTO apipayments
|
||||
(wallet, checking_id, bolt11, hash, preimage,
|
||||
amount, pending, memo, fee, extra, webhook, expiry)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
amount, status, memo, fee, extra, webhook, expiry, pending)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
""",
|
||||
(
|
||||
wallet_id,
|
||||
@@ -65,12 +65,13 @@ cursor.execute(
|
||||
"test_admin_internal",
|
||||
None,
|
||||
amount * 1000,
|
||||
False,
|
||||
"success",
|
||||
"test_admin_internal",
|
||||
0,
|
||||
None,
|
||||
"",
|
||||
expiration_date,
|
||||
False, # TODO: remove this in next release
|
||||
),
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user