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
|
// Check if this is a duplicate account error from saveNewIdentity
|
||||||
const errorMessage =
|
const errorMessage =
|
||||||
error instanceof Error ? error.message : String(error);
|
error instanceof Error ? error.message : String(error);
|
||||||
if (
|
if (errorMessage.includes("Cannot import duplicate account")) {
|
||||||
errorMessage.includes("already exists") &&
|
|
||||||
errorMessage.includes("Cannot import duplicate account")
|
|
||||||
) {
|
|
||||||
this.notify.warning(
|
this.notify.warning(
|
||||||
NOTIFY_DUPLICATE_ACCOUNT_IMPORT.message,
|
NOTIFY_DUPLICATE_ACCOUNT_IMPORT.message,
|
||||||
TIMEOUTS.LONG,
|
TIMEOUTS.LONG,
|
||||||
|
|||||||
Reference in New Issue
Block a user