make refunds work properly

This commit is contained in:
Lee Salminen
2022-08-29 09:32:13 -06:00
parent 7baec1de15
commit 88210129b7
4 changed files with 31 additions and 11 deletions
+3 -5
View File
@@ -214,19 +214,17 @@ async def create_refund(hit_id, refund_amount) -> Refund:
refund_id = urlsafe_short_hash()
await db.execute(
"""
INSERT INTO boltcards.hits (
INSERT INTO boltcards.refunds (
id,
hit_id,
refund_amount,
payment_hash
refund_amount
)
VALUES (?, ?, ?, ?)
VALUES (?, ?, ?)
""",
(
refund_id,
hit_id,
refund_amount,
payment_hash,
),
)
refund = await get_refund(refund_id)