From c9082fa57bc4303d0c707558470f017eb7e56efa Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Mon, 1 Sep 2025 16:02:48 +0800 Subject: [PATCH] refactor: remove single-use notification constant - Replace constant usage with direct message string in ImportDerivedAccountView.vue - Clean up import statement to remove unused import - Remove unused constant from notifications.ts --- src/constants/notifications.ts | 8 -------- src/views/ImportDerivedAccountView.vue | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/constants/notifications.ts b/src/constants/notifications.ts index 136a6a24..5cc75bd4 100644 --- a/src/constants/notifications.ts +++ b/src/constants/notifications.ts @@ -1697,11 +1697,3 @@ export const NOTIFY_DUPLICATE_ACCOUNT_IMPORT = { message: "This account has already been imported. Please use a different seed phrase or check your existing accounts.", }; - -// ImportDerivedAccountView.vue specific constants -// Used in: ImportDerivedAccountView.vue (incrementDerivation method - duplicate derived account warning) -export const NOTIFY_DUPLICATE_DERIVED_ACCOUNT = { - title: "Derived Account Already Exists", - message: - "This derived account already exists. Please try a different derivation path.", -}; diff --git a/src/views/ImportDerivedAccountView.vue b/src/views/ImportDerivedAccountView.vue index 834950f6..44ef37d2 100644 --- a/src/views/ImportDerivedAccountView.vue +++ b/src/views/ImportDerivedAccountView.vue @@ -91,7 +91,6 @@ import { createNotifyHelpers, TIMEOUTS, NotifyFunction } from "@/utils/notify"; import { NOTIFY_ACCOUNT_DERIVATION_SUCCESS, NOTIFY_ACCOUNT_DERIVATION_ERROR, - NOTIFY_DUPLICATE_DERIVED_ACCOUNT, } from "@/constants/notifications"; @Component({ @@ -176,7 +175,7 @@ export default class ImportAccountView extends Vue { const isDuplicate = await this.checkForDuplicateAccount(newId.did); if (isDuplicate) { this.notify.warning( - NOTIFY_DUPLICATE_DERIVED_ACCOUNT.message, + "This derived account already exists. Please try a different derivation path.", TIMEOUTS.LONG, ); return;