Adds receivable entry functionality

Implements the ability to record receivables (user owes the castle).

Adds API endpoint for creating receivable entries, which includes currency conversion to satoshis if fiat currency is provided.

Integrates a UI component (receivable dialog) for superusers to record debts owed by users, enhancing financial tracking capabilities.
This commit is contained in:
padreug 2025-10-22 16:16:36 +02:00
parent b7e4e05469
commit 2a14dd2e62
4 changed files with 250 additions and 3 deletions

View file

@ -446,3 +446,12 @@ async def update_user_wallet_settings(
settings = StoredUserWalletSettings(**data.dict(), id=user_id)
await db.update("user_wallet_settings", settings)
return settings
async def get_all_user_wallet_settings() -> list[StoredUserWalletSettings]:
"""Get all user wallet settings"""
return await db.fetchall(
"SELECT * FROM user_wallet_settings ORDER BY id",
{},
StoredUserWalletSettings,
)