From a12f033b72397385a65446596d3c8101f9ac9778 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 5 Nov 2023 17:02:24 -0700 Subject: [PATCH] refactor type that was a duplication --- src/views/AccountViewView.vue | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 1ef6d8ae3..722ef90f8 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -346,7 +346,7 @@ import { useClipboard } from "@vueuse/core"; import QuickNav from "@/components/QuickNav.vue"; import { AppString } from "@/constants/app"; import { db, accountsDB } from "@/db/index"; -import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; +import { MASTER_SETTINGS_KEY, Settings } from "@/db/tables/settings"; import { accessToken } from "@/libs/crypto"; import { IIdentifier } from "@veramo/core"; import { ErrorResponse, RateLimits } from "@/libs/endorserServer"; @@ -368,14 +368,6 @@ interface IAccount { derivationPath: string; } -interface SettingsType { - activeDid?: string; - apiServer?: string; - firstName?: string; - lastName?: string; // deprecated, pre v 0.1.3 - showContactGivesInline?: boolean; -} - @Component({ components: { QuickNav } }) export default class AccountViewView extends Vue { $notify!: (notification: Notification, timeout?: number) => void; @@ -401,8 +393,6 @@ export default class AccountViewView extends Vue { showPubCopy = false; showAdvanced = false; - alertMessage = ""; - alertTitle = ""; public async getIdentity(activeDid: string): Promise { try { @@ -508,7 +498,7 @@ export default class AccountViewView extends Vue { * Initializes component state with values from the database or defaults. * @param {SettingsType} settings - Object containing settings from the database. */ - initializeState(settings: SettingsType | undefined) { + initializeState(settings: Settings | undefined) { this.activeDid = (settings?.activeDid as string) || ""; this.apiServer = (settings?.apiServer as string) || ""; this.apiServerInput = (settings?.apiServer as string) || "";