diff --git a/lnbits/bolt11.py b/lnbits/bolt11.py index 6acc6db7..b9f3270b 100644 --- a/lnbits/bolt11.py +++ b/lnbits/bolt11.py @@ -161,9 +161,9 @@ def _trim_to_bytes(barr): def _readable_scid(short_channel_id: int) -> str: return "{blockheight}x{transactionindex}x{outputindex}".format( - blockheight=((short_channel_id >> 40) & 0xFFFFFF), - transactionindex=((short_channel_id >> 16) & 0xFFFFFF), - outputindex=(short_channel_id & 0xFFFF), + blockheight=((short_channel_id >> 40) & 0xffffff), + transactionindex=((short_channel_id >> 16) & 0xffffff), + outputindex=(short_channel_id & 0xffff), ) diff --git a/lnbits/extensions/bleskomat/crud.py b/lnbits/extensions/bleskomat/crud.py index 11dcb49c..1cc44576 100644 --- a/lnbits/extensions/bleskomat/crud.py +++ b/lnbits/extensions/bleskomat/crud.py @@ -42,7 +42,9 @@ async def create_bleskomat( async def get_bleskomat(bleskomat_id: str) -> Optional[Bleskomat]: - row = await db.fetchone("SELECT * FROM bleskomat.bleskomats WHERE id = ?", (bleskomat_id,)) + row = await db.fetchone( + "SELECT * FROM bleskomat.bleskomats WHERE id = ?", (bleskomat_id,) + ) return Bleskomat(**row) if row else None @@ -66,9 +68,12 @@ async def get_bleskomats(wallet_ids: Union[str, List[str]]) -> List[Bleskomat]: async def update_bleskomat(bleskomat_id: str, **kwargs) -> Optional[Bleskomat]: q = ", ".join([f"{field[0]} = ?" for field in kwargs.items()]) await db.execute( - f"UPDATE bleskomat.bleskomats SET {q} WHERE id = ?", (*kwargs.values(), bleskomat_id) + f"UPDATE bleskomat.bleskomats SET {q} WHERE id = ?", + (*kwargs.values(), bleskomat_id), + ) + row = await db.fetchone( + "SELECT * FROM bleskomat.bleskomats WHERE id = ?", (bleskomat_id,) ) - row = await db.fetchone("SELECT * FROM bleskomat.bleskomats WHERE id = ?", (bleskomat_id,)) return Bleskomat(**row) if row else None @@ -108,5 +113,7 @@ async def create_bleskomat_lnurl( async def get_bleskomat_lnurl(secret: str) -> Optional[BleskomatLnurl]: hash = generate_bleskomat_lnurl_hash(secret) - row = await db.fetchone("SELECT * FROM bleskomat.bleskomat_lnurls WHERE hash = ?", (hash,)) + row = await db.fetchone( + "SELECT * FROM bleskomat.bleskomat_lnurls WHERE hash = ?", (hash,) + ) return BleskomatLnurl(**row) if row else None diff --git a/lnbits/extensions/captcha/crud.py b/lnbits/extensions/captcha/crud.py index 17cbb4f5..43a0374e 100644 --- a/lnbits/extensions/captcha/crud.py +++ b/lnbits/extensions/captcha/crud.py @@ -30,7 +30,9 @@ async def create_captcha( async def get_captcha(captcha_id: str) -> Optional[Captcha]: - row = await db.fetchone("SELECT * FROM captcha.captchas WHERE id = ?", (captcha_id,)) + row = await db.fetchone( + "SELECT * FROM captcha.captchas WHERE id = ?", (captcha_id,) + ) return Captcha.from_row(row) if row else None diff --git a/lnbits/extensions/diagonalley/crud.py b/lnbits/extensions/diagonalley/crud.py index 33f020bf..971cd449 100644 --- a/lnbits/extensions/diagonalley/crud.py +++ b/lnbits/extensions/diagonalley/crud.py @@ -57,16 +57,21 @@ def update_diagonalleys_product(product_id: str, **kwargs) -> Optional[Indexers] with open_ext_db("diagonalley") as db: db.execute( - f"UPDATE diagonalley.products SET {q} WHERE id = ?", (*kwargs.values(), product_id) + f"UPDATE diagonalley.products SET {q} WHERE id = ?", + (*kwargs.values(), product_id), + ) + row = db.fetchone( + "SELECT * FROM diagonalley.products WHERE id = ?", (product_id,) ) - row = db.fetchone("SELECT * FROM diagonalley.products WHERE id = ?", (product_id,)) return get_diagonalleys_indexer(product_id) def get_diagonalleys_product(product_id: str) -> Optional[Products]: with open_ext_db("diagonalley") as db: - row = db.fetchone("SELECT * FROM diagonalley.products WHERE id = ?", (product_id,)) + row = db.fetchone( + "SELECT * FROM diagonalley.products WHERE id = ?", (product_id,) + ) return Products(**row) if row else None @@ -131,16 +136,21 @@ def update_diagonalleys_indexer(indexer_id: str, **kwargs) -> Optional[Indexers] with open_ext_db("diagonalley") as db: db.execute( - f"UPDATE diagonalley.indexers SET {q} WHERE id = ?", (*kwargs.values(), indexer_id) + f"UPDATE diagonalley.indexers SET {q} WHERE id = ?", + (*kwargs.values(), indexer_id), + ) + row = db.fetchone( + "SELECT * FROM diagonalley.indexers WHERE id = ?", (indexer_id,) ) - row = db.fetchone("SELECT * FROM diagonalley.indexers WHERE id = ?", (indexer_id,)) return get_diagonalleys_indexer(indexer_id) def get_diagonalleys_indexer(indexer_id: str) -> Optional[Indexers]: with open_ext_db("diagonalley") as db: - roww = db.fetchone("SELECT * FROM diagonalley.indexers WHERE id = ?", (indexer_id,)) + roww = db.fetchone( + "SELECT * FROM diagonalley.indexers WHERE id = ?", (indexer_id,) + ) try: x = httpx.get(roww["indexeraddress"] + "/" + roww["ratingkey"]) if x.status_code == 200: @@ -166,7 +176,9 @@ def get_diagonalleys_indexer(indexer_id: str) -> Optional[Indexers]: except: print("An exception occurred") with open_ext_db("diagonalley") as db: - row = db.fetchone("SELECT * FROM diagonalley.indexers WHERE id = ?", (indexer_id,)) + row = db.fetchone( + "SELECT * FROM diagonalley.indexers WHERE id = ?", (indexer_id,) + ) return Indexers(**row) if row else None @@ -285,7 +297,8 @@ def get_diagonalleys_orders(wallet_ids: Union[str, List[str]]) -> List[Orders]: ), ) rows = db.fetchall( - f"SELECT * FROM diagonalley.orders WHERE wallet IN ({q})", (*wallet_ids,) + f"SELECT * FROM diagonalley.orders WHERE wallet IN ({q})", + (*wallet_ids,), ) return [Orders(**row) for row in rows] diff --git a/lnbits/extensions/diagonalley/views_api.py b/lnbits/extensions/diagonalley/views_api.py index 07aad712..71a2eca6 100644 --- a/lnbits/extensions/diagonalley/views_api.py +++ b/lnbits/extensions/diagonalley/views_api.py @@ -250,7 +250,9 @@ async def api_diagonalleys_order_shipped(order_id): order_id, ), ) - order = db.fetchone("SELECT * FROM diagonalley.orders WHERE id = ?", (order_id,)) + order = db.fetchone( + "SELECT * FROM diagonalley.orders WHERE id = ?", (order_id,) + ) return ( jsonify( @@ -268,12 +270,16 @@ async def api_diagonalleys_order_shipped(order_id): ) async def api_diagonalleys_stall_products(indexer_id): with open_ext_db("diagonalley") as db: - rows = db.fetchone("SELECT * FROM diagonalley.indexers WHERE id = ?", (indexer_id,)) + rows = db.fetchone( + "SELECT * FROM diagonalley.indexers WHERE id = ?", (indexer_id,) + ) print(rows[1]) if not rows: return jsonify({"message": "Indexer does not exist."}), HTTPStatus.NOT_FOUND - products = db.fetchone("SELECT * FROM diagonalley.products WHERE wallet = ?", (rows[1],)) + products = db.fetchone( + "SELECT * FROM diagonalley.products WHERE wallet = ?", (rows[1],) + ) if not products: return jsonify({"message": "No products"}), HTTPStatus.NOT_FOUND @@ -293,7 +299,9 @@ async def api_diagonalleys_stall_products(indexer_id): ) async def api_diagonalleys_stall_checkshipped(checking_id): with open_ext_db("diagonalley") as db: - rows = db.fetchone("SELECT * FROM diagonalley.orders WHERE invoiceid = ?", (checking_id,)) + rows = db.fetchone( + "SELECT * FROM diagonalley.orders WHERE invoiceid = ?", (checking_id,) + ) return jsonify({"shipped": rows["shipped"]}), HTTPStatus.OK diff --git a/lnbits/extensions/events/crud.py b/lnbits/extensions/events/crud.py index f7839b93..dece8e6d 100644 --- a/lnbits/extensions/events/crud.py +++ b/lnbits/extensions/events/crud.py @@ -151,13 +151,18 @@ async def delete_event(event_id: str) -> None: async def get_event_tickets(event_id: str, wallet_id: str) -> List[Tickets]: rows = await db.fetchall( - "SELECT * FROM events.ticket WHERE wallet = ? AND event = ?", (wallet_id, event_id) + "SELECT * FROM events.ticket WHERE wallet = ? AND event = ?", + (wallet_id, event_id), ) return [Tickets(**row) for row in rows] async def reg_ticket(ticket_id: str) -> List[Tickets]: - await db.execute("UPDATE events.ticket SET registered = ? WHERE id = ?", (True, ticket_id)) + await db.execute( + "UPDATE events.ticket SET registered = ? WHERE id = ?", (True, ticket_id) + ) ticket = await db.fetchone("SELECT * FROM events.ticket WHERE id = ?", (ticket_id,)) - rows = await db.fetchall("SELECT * FROM events.ticket WHERE event = ?", (ticket[1],)) + rows = await db.fetchall( + "SELECT * FROM events.ticket WHERE event = ?", (ticket[1],) + ) return [Tickets(**row) for row in rows] diff --git a/lnbits/extensions/events/migrations.py b/lnbits/extensions/events/migrations.py index ae4e45f7..d8f3d94e 100644 --- a/lnbits/extensions/events/migrations.py +++ b/lnbits/extensions/events/migrations.py @@ -13,7 +13,9 @@ async def m001_initial(db): amount_tickets INTEGER NOT NULL, price_per_ticket INTEGER NOT NULL, sold INTEGER NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) @@ -27,7 +29,9 @@ async def m001_initial(db): name TEXT NOT NULL, email TEXT NOT NULL, registered BOOLEAN NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) @@ -45,7 +49,9 @@ async def m002_changed(db): email TEXT NOT NULL, registered BOOLEAN NOT NULL, paid BOOLEAN NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) diff --git a/lnbits/extensions/jukebox/tasks.py b/lnbits/extensions/jukebox/tasks.py index 7c902937..65fca93d 100644 --- a/lnbits/extensions/jukebox/tasks.py +++ b/lnbits/extensions/jukebox/tasks.py @@ -20,8 +20,9 @@ async def wait_for_paid_invoices(invoice_paid_chan: trio.MemoryReceiveChannel): async for payment in invoice_paid_chan: await on_invoice_paid(payment) + async def on_invoice_paid(payment: Payment) -> None: - if "jukebox" != payment.extra.get("tag"): - # not a jukebox invoice - return - await update_jukebox_payment(payment.payment_hash, paid=True) + if "jukebox" != payment.extra.get("tag"): + # not a jukebox invoice + return + await update_jukebox_payment(payment.payment_hash, paid=True) diff --git a/lnbits/extensions/lnticket/crud.py b/lnbits/extensions/lnticket/crud.py index e7bf5262..45be7124 100644 --- a/lnbits/extensions/lnticket/crud.py +++ b/lnbits/extensions/lnticket/crud.py @@ -30,7 +30,9 @@ async def create_ticket( async def set_ticket_paid(payment_hash: str) -> Tickets: - row = await db.fetchone("SELECT * FROM lnticket.ticket WHERE id = ?", (payment_hash,)) + row = await db.fetchone( + "SELECT * FROM lnticket.ticket WHERE id = ?", (payment_hash,) + ) if row[7] == False: await db.execute( """ @@ -124,7 +126,9 @@ async def create_form( async def update_form(form_id: str, **kwargs) -> Forms: q = ", ".join([f"{field[0]} = ?" for field in kwargs.items()]) - await db.execute(f"UPDATE lnticket.form SET {q} WHERE id = ?", (*kwargs.values(), form_id)) + await db.execute( + f"UPDATE lnticket.form SET {q} WHERE id = ?", (*kwargs.values(), form_id) + ) row = await db.fetchone("SELECT * FROM lnticket.form WHERE id = ?", (form_id,)) assert row, "Newly updated form couldn't be retrieved" return Forms(**row) diff --git a/lnbits/extensions/lnticket/migrations.py b/lnbits/extensions/lnticket/migrations.py index c2c2d275..82d5f3b8 100644 --- a/lnbits/extensions/lnticket/migrations.py +++ b/lnbits/extensions/lnticket/migrations.py @@ -9,7 +9,9 @@ async def m001_initial(db): description TEXT NOT NULL, costpword INTEGER NOT NULL, amountmade INTEGER NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) @@ -24,7 +26,9 @@ async def m001_initial(db): name TEXT NOT NULL, wallet TEXT NOT NULL, sats INTEGER NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) @@ -43,12 +47,16 @@ async def m002_changed(db): wallet TEXT NOT NULL, sats INTEGER NOT NULL, paid BOOLEAN NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) - for row in [list(row) for row in await db.fetchall("SELECT * FROM lnticket.tickets")]: + for row in [ + list(row) for row in await db.fetchall("SELECT * FROM lnticket.tickets") + ]: usescsv = "" for i in range(row[5]): @@ -97,7 +105,9 @@ async def m003_changed(db): description TEXT NOT NULL, costpword INTEGER NOT NULL, amountmade INTEGER NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) diff --git a/lnbits/extensions/offlineshop/crud.py b/lnbits/extensions/offlineshop/crud.py index eb19c939..0168536b 100644 --- a/lnbits/extensions/offlineshop/crud.py +++ b/lnbits/extensions/offlineshop/crud.py @@ -22,7 +22,9 @@ async def get_shop(id: int) -> Optional[Shop]: async def get_or_create_shop_by_wallet(wallet: str) -> Optional[Shop]: - row = await db.fetchone("SELECT * FROM offlineshop.shops WHERE wallet = ?", (wallet,)) + row = await db.fetchone( + "SELECT * FROM offlineshop.shops WHERE wallet = ?", (wallet,) + ) if not row: # create on the fly @@ -83,7 +85,9 @@ async def update_item( async def get_item(id: int) -> Optional[Item]: - row = await db.fetchone("SELECT * FROM offlineshop.items WHERE id = ? LIMIT 1", (id,)) + row = await db.fetchone( + "SELECT * FROM offlineshop.items WHERE id = ? LIMIT 1", (id,) + ) return Item(**dict(row)) if row else None diff --git a/lnbits/extensions/offlineshop/helpers.py b/lnbits/extensions/offlineshop/helpers.py index 6b56cf55..db2c19cc 100644 --- a/lnbits/extensions/offlineshop/helpers.py +++ b/lnbits/extensions/offlineshop/helpers.py @@ -8,8 +8,8 @@ def hotp(key, counter, digits=6, digest="sha1"): key = base64.b32decode(key.upper() + "=" * ((8 - len(key)) % 8)) counter = struct.pack(">Q", counter) mac = hmac.new(key, counter, digest).digest() - offset = mac[-1] & 0x0F - binary = struct.unpack(">L", mac[offset : offset + 4])[0] & 0x7FFFFFFF + offset = mac[-1] & 0x0f + binary = struct.unpack(">L", mac[offset : offset + 4])[0] & 0x7fffffff return str(binary)[-digits:].zfill(digits) diff --git a/lnbits/extensions/paywall/crud.py b/lnbits/extensions/paywall/crud.py index 758d6a04..c13aba43 100644 --- a/lnbits/extensions/paywall/crud.py +++ b/lnbits/extensions/paywall/crud.py @@ -30,7 +30,9 @@ async def create_paywall( async def get_paywall(paywall_id: str) -> Optional[Paywall]: - row = await db.fetchone("SELECT * FROM paywall.paywalls WHERE id = ?", (paywall_id,)) + row = await db.fetchone( + "SELECT * FROM paywall.paywalls WHERE id = ?", (paywall_id,) + ) return Paywall.from_row(row) if row else None diff --git a/lnbits/extensions/splitpayments/crud.py b/lnbits/extensions/splitpayments/crud.py index 10549930..ef10add4 100644 --- a/lnbits/extensions/splitpayments/crud.py +++ b/lnbits/extensions/splitpayments/crud.py @@ -5,13 +5,17 @@ from .models import Target async def get_targets(source_wallet: str) -> List[Target]: - rows = await db.fetchall("SELECT * FROM splitpayments.targets WHERE source = ?", (source_wallet,)) + rows = await db.fetchall( + "SELECT * FROM splitpayments.targets WHERE source = ?", (source_wallet,) + ) return [Target(**dict(row)) for row in rows] async def set_targets(source_wallet: str, targets: List[Target]): async with db.connect() as conn: - await conn.execute("DELETE FROM splitpayments.targets WHERE source = ?", (source_wallet,)) + await conn.execute( + "DELETE FROM splitpayments.targets WHERE source = ?", (source_wallet,) + ) for target in targets: await conn.execute( """ diff --git a/lnbits/extensions/subdomains/crud.py b/lnbits/extensions/subdomains/crud.py index 0f98d8bc..08cb19eb 100644 --- a/lnbits/extensions/subdomains/crud.py +++ b/lnbits/extensions/subdomains/crud.py @@ -152,13 +152,17 @@ async def update_domain(domain_id: str, **kwargs) -> Domains: await db.execute( f"UPDATE subdomains.domain SET {q} WHERE id = ?", (*kwargs.values(), domain_id) ) - row = await db.fetchone("SELECT * FROM subdomains.domain WHERE id = ?", (domain_id,)) + row = await db.fetchone( + "SELECT * FROM subdomains.domain WHERE id = ?", (domain_id,) + ) assert row, "Newly updated domain couldn't be retrieved" return Domains(**row) async def get_domain(domain_id: str) -> Optional[Domains]: - row = await db.fetchone("SELECT * FROM subdomains.domain WHERE id = ?", (domain_id,)) + row = await db.fetchone( + "SELECT * FROM subdomains.domain WHERE id = ?", (domain_id,) + ) return Domains(**row) if row else None diff --git a/lnbits/extensions/subdomains/migrations.py b/lnbits/extensions/subdomains/migrations.py index 37474152..292d1f18 100644 --- a/lnbits/extensions/subdomains/migrations.py +++ b/lnbits/extensions/subdomains/migrations.py @@ -13,7 +13,9 @@ async def m001_initial(db): cost INTEGER NOT NULL, amountmade INTEGER NOT NULL, allowed_record_types TEXT NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) @@ -31,7 +33,9 @@ async def m001_initial(db): duration INTEGER NOT NULL, paid BOOLEAN NOT NULL, record_type TEXT NOT NULL, - time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ + time TIMESTAMP NOT NULL DEFAULT """ + + db.timestamp_now + + """ ); """ ) diff --git a/lnbits/extensions/usermanager/crud.py b/lnbits/extensions/usermanager/crud.py index 24899e32..a7854ad8 100644 --- a/lnbits/extensions/usermanager/crud.py +++ b/lnbits/extensions/usermanager/crud.py @@ -56,7 +56,9 @@ async def get_usermanager_user(user_id: str) -> Optional[Users]: async def get_usermanager_users(user_id: str) -> List[Users]: - rows = await db.fetchall("SELECT * FROM usermanager.users WHERE admin = ?", (user_id,)) + rows = await db.fetchall( + "SELECT * FROM usermanager.users WHERE admin = ?", (user_id,) + ) return [Users(**row) for row in rows] @@ -89,17 +91,23 @@ async def create_usermanager_wallet( async def get_usermanager_wallet(wallet_id: str) -> Optional[Wallets]: - row = await db.fetchone("SELECT * FROM usermanager.wallets WHERE id = ?", (wallet_id,)) + row = await db.fetchone( + "SELECT * FROM usermanager.wallets WHERE id = ?", (wallet_id,) + ) return Wallets(**row) if row else None async def get_usermanager_wallets(admin_id: str) -> Optional[Wallets]: - rows = await db.fetchall("SELECT * FROM usermanager.wallets WHERE admin = ?", (admin_id,)) + rows = await db.fetchall( + "SELECT * FROM usermanager.wallets WHERE admin = ?", (admin_id,) + ) return [Wallets(**row) for row in rows] async def get_usermanager_users_wallets(user_id: str) -> Optional[Wallets]: - rows = await db.fetchall("""SELECT * FROM usermanager.wallets WHERE "user" = ?""", (user_id,)) + rows = await db.fetchall( + """SELECT * FROM usermanager.wallets WHERE "user" = ?""", (user_id,) + ) return [Wallets(**row) for row in rows] diff --git a/lnbits/extensions/withdraw/crud.py b/lnbits/extensions/withdraw/crud.py index f161df74..1992e6ab 100644 --- a/lnbits/extensions/withdraw/crud.py +++ b/lnbits/extensions/withdraw/crud.py @@ -57,7 +57,9 @@ async def create_withdraw_link( async def get_withdraw_link(link_id: str, num=0) -> Optional[WithdrawLink]: - row = await db.fetchone("SELECT * FROM withdraw.withdraw_link WHERE id = ?", (link_id,)) + row = await db.fetchone( + "SELECT * FROM withdraw.withdraw_link WHERE id = ?", (link_id,) + ) if not row: return None @@ -97,9 +99,12 @@ async def get_withdraw_links(wallet_ids: Union[str, List[str]]) -> List[Withdraw async def update_withdraw_link(link_id: str, **kwargs) -> Optional[WithdrawLink]: q = ", ".join([f"{field[0]} = ?" for field in kwargs.items()]) await db.execute( - f"UPDATE withdraw.withdraw_link SET {q} WHERE id = ?", (*kwargs.values(), link_id) + f"UPDATE withdraw.withdraw_link SET {q} WHERE id = ?", + (*kwargs.values(), link_id), + ) + row = await db.fetchone( + "SELECT * FROM withdraw.withdraw_link WHERE id = ?", (link_id,) ) - row = await db.fetchone("SELECT * FROM withdraw.withdraw_link WHERE id = ?", (link_id,)) return WithdrawLink.from_row(row) if row else None @@ -134,7 +139,9 @@ async def create_hash_check( async def get_hash_check(the_hash: str, lnurl_id: str) -> Optional[HashCheck]: - rowid = await db.fetchone("SELECT * FROM withdraw.hash_check WHERE id = ?", (the_hash,)) + rowid = await db.fetchone( + "SELECT * FROM withdraw.hash_check WHERE id = ?", (the_hash,) + ) rowlnurl = await db.fetchone( "SELECT * FROM withdraw.hash_check WHERE lnurl_id = ?", (lnurl_id,) ) diff --git a/lnbits/extensions/withdraw/migrations.py b/lnbits/extensions/withdraw/migrations.py index beff4c99..1a13aa6d 100644 --- a/lnbits/extensions/withdraw/migrations.py +++ b/lnbits/extensions/withdraw/migrations.py @@ -47,7 +47,9 @@ async def m002_change_withdraw_table(db): """ ) - for row in [list(row) for row in await db.fetchall("SELECT * FROM withdraw.withdraw_links")]: + for row in [ + list(row) for row in await db.fetchall("SELECT * FROM withdraw.withdraw_links") + ]: usescsv = "" for i in range(row[5]):