Browse Source

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
pull/189/head
Jose Olarte III 3 days ago
parent
commit
c9082fa57b
  1. 8
      src/constants/notifications.ts
  2. 3
      src/views/ImportDerivedAccountView.vue

8
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.",
};

3
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;

Loading…
Cancel
Save