diff --git a/src/constants/notifications.ts b/src/constants/notifications.ts index 33d36e5d..a3fbb43e 100644 --- a/src/constants/notifications.ts +++ b/src/constants/notifications.ts @@ -43,12 +43,6 @@ export const NOTIFY_CONFIRMATION_ERROR = { message: "There was a problem submitting the confirmation.", }; -// Used in: [Component usage not yet documented] -export const NOTIFY_DEFAULT_TO_ACTIVE_DID = { - title: "Your Info", - message: "No user was specified so showing your info.", -}; - // Used in: [Component usage not yet documented] export const NOTIFY_CONTACT_DELETED = { title: "Deleted", diff --git a/src/libs/util.ts b/src/libs/util.ts index 79a70720..d62b23e3 100644 --- a/src/libs/util.ts +++ b/src/libs/util.ts @@ -36,6 +36,11 @@ import { DEFAULT_ROOT_DERIVATION_PATH } from "./crypto"; import { UNNAMED_PERSON } from "@/constants/entities"; // Consolidate this with src/utils/PlatformServiceMixin.mapQueryResultToValues +/** + * Translate DB query results into objects + * @param record is result of a database query + * @returns an array of objects (instead of nested arrays), each representing a row in the result + */ function mapQueryResultToValues( record: { columns: string[]; values: unknown[][] } | undefined, ): Array> { @@ -575,7 +580,7 @@ export const retrieveAccountDids = async (): Promise => { const platformService = await getPlatformService(); const dbAccounts = await platformService.dbQuery(`SELECT did FROM accounts`); const allDids = - mapQueryResultToValues(dbAccounts)?.map((row) => row[0] as string) || []; + mapQueryResultToValues(dbAccounts)?.map((row) => row.did as string) || []; return allDids; }; diff --git a/src/views/DIDView.vue b/src/views/DIDView.vue index 223c3a53..e8336146 100644 --- a/src/views/DIDView.vue +++ b/src/views/DIDView.vue @@ -344,7 +344,6 @@ import { logger } from "../utils/logger"; import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin"; import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify"; import { - NOTIFY_DEFAULT_TO_ACTIVE_DID, NOTIFY_CONTACT_DELETED, NOTIFY_CONTACT_DELETE_FAILED, NOTIFY_REGISTRATION_SUCCESS, @@ -459,7 +458,6 @@ export default class DIDView extends Vue { if (!showDid) { // No DID provided in URL, use active DID showDid = this.activeDid; - this.notifyDefaultToActiveDID(); } else { // DID provided in URL, validate it const decodedDid = decodeURIComponent(showDid); @@ -475,17 +473,6 @@ export default class DIDView extends Vue { this.viewingDid = showDid; } - /** - * Notifies user that we're showing their DID info by default - */ - private notifyDefaultToActiveDID() { - this.notify.toast( - NOTIFY_DEFAULT_TO_ACTIVE_DID.title, - NOTIFY_DEFAULT_TO_ACTIVE_DID.message, - TIMEOUTS.SHORT, - ); - } - /** * Loads contact information for the viewing DID * Updates contact YAML representation if contact exists