aboutsummaryrefslogtreecommitdiffstats
path: root/lib/register.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-04 23:13:33 -0800
committerAdam Soltys <[email protected]>2026-02-06 09:00:09 -0800
commit1ebc40afc14a75d7fe157b2c6c20ffea9dedb5eb (patch)
tree960318969072afa63536e9429c27fa40ca2919d3 /lib/register.ts
parentc0481268da25eed1f25281508b5c4777d26c2b03 (diff)
downloadcoinos-server-1ebc40afc14a75d7fe157b2c6c20ffea9dedb5eb.tar.gz
coinos-server-1ebc40afc14a75d7fe157b2c6c20ffea9dedb5eb.zip
tigerbeetle
Diffstat (limited to 'lib/register.ts')
-rw-r--r--lib/register.ts5
1 files changed, 4 insertions, 1 deletions
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)