This commit is contained in:
dni ⚡
2024-10-14 10:06:13 +02:00
parent b72a81aa4c
commit 75e07b21c7
2 changed files with 2 additions and 10 deletions
+2
View File
@@ -562,6 +562,8 @@ async def m023_add_column_column_to_apipayments(db):
await db.execute("ALTER TABLE apipayments RENAME COLUMN wallet TO wallet_id") await db.execute("ALTER TABLE apipayments RENAME COLUMN wallet TO wallet_id")
await db.execute("ALTER TABLE accounts RENAME COLUMN pass TO password_hash") await db.execute("ALTER TABLE accounts RENAME COLUMN pass TO password_hash")
await db.execute("CREATE INDEX by_hash ON apipayments (payment_hash)")
async def m024_drop_pending(db): async def m024_drop_pending(db):
await db.execute("ALTER TABLE apipayments DROP COLUMN pending") await db.execute("ALTER TABLE apipayments DROP COLUMN pending")
-10
View File
@@ -2,7 +2,6 @@ from __future__ import annotations
import hashlib import hashlib
import hmac import hmac
import json
from dataclasses import dataclass from dataclasses import dataclass
from datetime import datetime, timezone from datetime import datetime, timezone
from enum import Enum from enum import Enum
@@ -27,15 +26,6 @@ from lnbits.wallets.base import (
) )
def json_custom_serialization(_, o):
if isinstance(o, datetime):
return o.isoformat()
raise TypeError(f"Object is not JSON serializable: {o}")
json.JSONEncoder.default = json_custom_serialization # type: ignore[method-assign]
class BaseWallet(BaseModel): class BaseWallet(BaseModel):
id: str id: str
name: str name: str