aboutsummaryrefslogtreecommitdiffstats
path: root/lib/register.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-02-13 10:18:04 -0800
committerAdam Soltys <[email protected]>2025-02-13 10:18:04 -0800
commit1888e338f2ccef16ccdb738cfdd04ffe516e023a (patch)
treeb3376733f9cdd80099ff2362974dc43075c66af9 /lib/register.ts
parentb8cfc175d924a467b7c3d43e2e9b24b6b3703007 (diff)
downloadcoinos-server-1888e338f2ccef16ccdb738cfdd04ffe516e023a.tar.gz
coinos-server-1888e338f2ccef16ccdb738cfdd04ffe516e023a.zip
add uid to default app
Diffstat (limited to 'lib/register.ts')
-rw-r--r--lib/register.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/register.ts b/lib/register.ts
index 90cfe060..1493211c 100644
--- a/lib/register.ts
+++ b/lib/register.ts
@@ -70,10 +70,12 @@ export default async (user, ip) => {
name: "Spending",
});
- const secret = bytesToHex(randomBytes(32));
+ const bytes = randomBytes(32);
+ const secret = bytesToHex(bytes);
const app = {
+ uid: id,
secret,
- pubkey: getPublicKey(secret),
+ pubkey: getPublicKey(bytes),
max_amount: 10000,
budget_renewal: "weekly",
name: username,