aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-05 23:05:21 -0800
committerAdam Soltys <[email protected]>2026-02-06 09:00:38 -0800
commitc8ec6fa5d3be57d570cc67cc10692b631df0f921 (patch)
tree5ce0b7c395e2d4700964d4c47e3bbbc8963a5650
parent310568dea00de03edd27b702a881e66fd7b5b837 (diff)
downloadcoinos-server-c8ec6fa5d3be57d570cc67cc10692b631df0f921.tar.gz
coinos-server-c8ec6fa5d3be57d570cc67cc10692b631df0f921.zip
track account index
-rw-r--r--lib/types.ts1
-rw-r--r--lib/whitelist.ts1
-rw-r--r--routes/users.ts3
3 files changed, 4 insertions, 1 deletions
diff --git a/lib/types.ts b/lib/types.ts
index 685c7f41..1f9e5629 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -1,5 +1,6 @@
export interface User {
about: string;
+ accountIndex: string;
admin: string;
anon: string;
arkAddress: string;
diff --git a/lib/whitelist.ts b/lib/whitelist.ts
index 748092cb..ab34be9f 100644
--- a/lib/whitelist.ts
+++ b/lib/whitelist.ts
@@ -1,5 +1,6 @@
export default [
"about",
+ "accountIndex",
"admin",
"anon",
"arkAddress",
diff --git a/routes/users.ts b/routes/users.ts
index 32ecebc4..f7912f4a 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -309,6 +309,7 @@ export default {
const attributes = [
"about",
+ "accountIndex",
"arkAddress",
"autowithdraw",
"banner",
@@ -833,7 +834,7 @@ export default {
for (const id of await db.lRange(`${user.id}:accounts`, 0, -1)) {
const account = await g(`account:${id}`);
if (account) {
- if (account.seed && account.pubkey && !account.importedAt) {
+ if ((account.seed || user.seed) && account.pubkey && !account.importedAt) {
await importAccountHistory(account);
}
account.balance = await getBalance(id);