From 1ebc40afc14a75d7fe157b2c6c20ffea9dedb5eb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Feb 2026 23:13:33 -0800 Subject: tigerbeetle --- lib/register.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/register.ts') diff --git a/lib/register.ts b/lib/register.ts index a74ea640..acffa9f2 100644 --- a/lib/register.ts +++ b/lib/register.ts @@ -2,6 +2,7 @@ import config from "$config"; import countries from "$lib/countries"; import { db, s } from "$lib/db"; import { l, warn } from "$lib/logging"; +import { createBalanceAccount, createCreditAccounts } from "$lib/tb"; import { fail } from "$lib/utils"; import { bytesToHex, randomBytes } from "@noble/hashes/utils"; import { got } from "got"; @@ -88,11 +89,13 @@ export default async (user, ip) => { await s(`app:${app.pubkey}`, app); await db.sAdd(`${id}:apps`, app.pubkey); + await createBalanceAccount(id); + await createCreditAccounts(id); + db.multi() .set(`user:${id}`, JSON.stringify(user)) .set(`user:${username}`, id) .set(`user:${pubkey}`, id) - .set(`balance:${id}`, 0) .set(`account:${id}`, account) .set(`${pubkey}:follows:n`, 0) .set(`${pubkey}:followers:n`, 0) -- cgit v1.2.3