aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);