diff --git a/src/constants/notifications.ts b/src/constants/notifications.ts index 49b14812..136a6a24 100644 --- a/src/constants/notifications.ts +++ b/src/constants/notifications.ts @@ -1689,3 +1689,19 @@ export const NOTIFY_CONTACTS_ADDED_CONFIRM = { title: "They're Added To Your List", message: "Would you like to go to the main page now?", }; + +// ImportAccountView.vue specific constants +// Used in: ImportAccountView.vue (onImportClick method - duplicate account warning) +export const NOTIFY_DUPLICATE_ACCOUNT_IMPORT = { + title: "Account Already Imported", + 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/ImportAccountView.vue b/src/views/ImportAccountView.vue index 2e21e187..4b0c006b 100644 --- a/src/views/ImportAccountView.vue +++ b/src/views/ImportAccountView.vue @@ -95,6 +95,7 @@ import { import { retrieveAccountCount, importFromMnemonic } from "../libs/util"; import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin"; import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify"; +import { NOTIFY_DUPLICATE_ACCOUNT_IMPORT } from "@/constants/notifications"; /** * Import Account View Component @@ -206,7 +207,7 @@ export default class ImportAccountView extends Vue { const isDuplicate = await this.checkForDuplicateAccount(); if (isDuplicate) { this.notify.warning( - "This account has already been imported. Please use a different seed phrase or check your existing accounts.", + NOTIFY_DUPLICATE_ACCOUNT_IMPORT.message, TIMEOUTS.LONG, ); return; @@ -246,7 +247,7 @@ export default class ImportAccountView extends Vue { errorMessage.includes("Cannot import duplicate account") ) { this.notify.warning( - "This account has already been imported. Please use a different seed phrase or check your existing accounts.", + NOTIFY_DUPLICATE_ACCOUNT_IMPORT.message, TIMEOUTS.LONG, ); return; diff --git a/src/views/ImportDerivedAccountView.vue b/src/views/ImportDerivedAccountView.vue index 44ef37d2..834950f6 100644 --- a/src/views/ImportDerivedAccountView.vue +++ b/src/views/ImportDerivedAccountView.vue @@ -91,6 +91,7 @@ import { createNotifyHelpers, TIMEOUTS, NotifyFunction } from "@/utils/notify"; import { NOTIFY_ACCOUNT_DERIVATION_SUCCESS, NOTIFY_ACCOUNT_DERIVATION_ERROR, + NOTIFY_DUPLICATE_DERIVED_ACCOUNT, } from "@/constants/notifications"; @Component({ @@ -175,7 +176,7 @@ export default class ImportAccountView extends Vue { const isDuplicate = await this.checkForDuplicateAccount(newId.did); if (isDuplicate) { this.notify.warning( - "This derived account already exists. Please try a different derivation path.", + NOTIFY_DUPLICATE_DERIVED_ACCOUNT.message, TIMEOUTS.LONG, ); return; diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue index 01d0cdfd..361c822f 100644 --- a/src/views/ProjectViewView.vue +++ b/src/views/ProjectViewView.vue @@ -243,13 +243,19 @@ :project-name="name" /> -