feat: Shared Wallets/Joint Accounts (Issue #3297) (#3376)

This commit is contained in:
Ben Weeks 2025-11-07 20:25:03 +00:00 committed by GitHub
parent bd07f7a5ef
commit b54eedee84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 2078 additions and 163 deletions

View file

@ -106,15 +106,7 @@ async def user_alan():
if account:
await delete_account(account.id)
account = Account(
id=uuid4().hex,
email="alan@lnbits.com",
username="alan",
)
account.hash_password("secret1234")
user = await create_user_account(account)
yield user
yield await new_user("alan")
@pytest.fixture(scope="session")
@ -299,6 +291,20 @@ async def fake_payments(client, inkey_fresh_headers_to):
return fake_data, params
async def new_user(username: str | None = None) -> User:
id_ = uuid4().hex
username = username or f"u_{id_[:16]}"
account = Account(
id=id_,
email=f"{username}@lnbits.com",
username=username,
)
account.hash_password("secret1234")
user = await create_user_account(account)
return user
def _settings_cleanup(settings: Settings):
settings.lnbits_allow_new_accounts = True
settings.lnbits_allowed_users = []