vlad
This commit is contained in:
@@ -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 accounts RENAME COLUMN pass TO password_hash")
|
||||
|
||||
await db.execute("CREATE INDEX by_hash ON apipayments (payment_hash)")
|
||||
|
||||
|
||||
async def m024_drop_pending(db):
|
||||
await db.execute("ALTER TABLE apipayments DROP COLUMN pending")
|
||||
|
||||
@@ -2,7 +2,6 @@ from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import hmac
|
||||
import json
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, timezone
|
||||
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):
|
||||
id: str
|
||||
name: str
|
||||
|
||||
Reference in New Issue
Block a user