chore: a couple missed files

This commit is contained in:
Matthew Raymer
2025-09-11 05:07:52 +00:00
parent 616bef655a
commit eb77547ba1
2 changed files with 40 additions and 17 deletions

View File

@@ -673,25 +673,25 @@ export const PlatformServiceMixin = {
logger.debug(
"[PlatformServiceMixin] Active identity is null (initial state), attempting auto-selection",
);
// Try to auto-select first available account
const availableAccounts = await this.$dbQuery(
"SELECT did FROM accounts ORDER BY dateCreated, did LIMIT 1",
);
if (availableAccounts?.values?.length) {
const firstAccountDid = availableAccounts.values[0][0] as string;
logger.debug(
"[PlatformServiceMixin] Auto-selecting first account as active:",
{ firstAccountDid },
);
// Update active_identity table with the first account
await this.$dbExec(
"UPDATE active_identity SET activeDid = ?, lastUpdated = datetime('now') WHERE id = 1",
[firstAccountDid],
);
logger.debug(
"[PlatformServiceMixin] Active identity auto-selected successfully",
);