temp: whitelist unused table defintion since I'm doing step-wise changes
This commit is contained in:
@@ -58,6 +58,7 @@ import {
|
|||||||
generateInsertStatement,
|
generateInsertStatement,
|
||||||
generateUpdateStatement,
|
generateUpdateStatement,
|
||||||
} from "@/utils/sqlHelpers";
|
} from "@/utils/sqlHelpers";
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
import { ActiveIdentity } from "@/db/tables/activeIdentity";
|
import { ActiveIdentity } from "@/db/tables/activeIdentity";
|
||||||
|
|
||||||
// =================================================
|
// =================================================
|
||||||
@@ -561,26 +562,26 @@ export const PlatformServiceMixin = {
|
|||||||
|
|
||||||
if (result?.values?.length) {
|
if (result?.values?.length) {
|
||||||
const activeDid = result.values[0][0] as string;
|
const activeDid = result.values[0][0] as string;
|
||||||
|
|
||||||
// Validate activeDid exists in accounts
|
// Validate activeDid exists in accounts
|
||||||
if (activeDid) {
|
if (activeDid) {
|
||||||
const accountExists = await this.$dbQuery(
|
const accountExists = await this.$dbQuery(
|
||||||
"SELECT did FROM accounts WHERE did = ?",
|
"SELECT did FROM accounts WHERE did = ?",
|
||||||
[activeDid]
|
[activeDid],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (accountExists?.values?.length) {
|
if (accountExists?.values?.length) {
|
||||||
return { activeDid };
|
return { activeDid };
|
||||||
} else {
|
} else {
|
||||||
// Clear corrupted activeDid
|
// Clear corrupted activeDid
|
||||||
await this.$dbExec(
|
await this.$dbExec(
|
||||||
"UPDATE active_identity SET activeDid = '', lastUpdated = datetime('now') WHERE id = 1"
|
"UPDATE active_identity SET activeDid = '', lastUpdated = datetime('now') WHERE id = 1",
|
||||||
);
|
);
|
||||||
return { activeDid: "" };
|
return { activeDid: "" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { activeDid: "" };
|
return { activeDid: "" };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|||||||
Reference in New Issue
Block a user