feat: add duplicate account import prevention #189

Merged
jose merged 10 commits from account-import-duplicate-prevention into master 2025-09-01 13:58:49 +00:00
2 changed files with 1 additions and 10 deletions
Showing only changes of commit c9082fa57b - Show all commits

View File

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

View File

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