forked from trent_larson/crowd-funder-for-time-pwa
refactor: simplify duplicate account error detection
Replace dual string check with single unique identifier for more precise error handling
This commit is contained in:
@@ -245,10 +245,7 @@ export default class ImportAccountView extends Vue {
|
||||
// Check if this is a duplicate account error from saveNewIdentity
|
||||
const errorMessage =
|
||||
error instanceof Error ? error.message : String(error);
|
||||
if (
|
||||
errorMessage.includes("already exists") &&
|
||||
errorMessage.includes("Cannot import duplicate account")
|
||||
) {
|
||||
if (errorMessage.includes("Cannot import duplicate account")) {
|
||||
this.notify.warning(
|
||||
NOTIFY_DUPLICATE_ACCOUNT_IMPORT.message,
|
||||
TIMEOUTS.LONG,
|
||||
|
||||
Reference in New Issue
Block a user