diff --git a/packages/extension/src/background/messaging/internalMethods.ts b/packages/extension/src/background/messaging/internalMethods.ts index aec2d6da..4033bd65 100644 --- a/packages/extension/src/background/messaging/internalMethods.ts +++ b/packages/extension/src/background/messaging/internalMethods.ts @@ -373,7 +373,10 @@ export class InternalMethods { if (existingAccounts) { for (let i = 0; i < existingAccounts.length; i++) { if (existingAccounts[i].address === targetAddress) { - throw new Error(`Account already exists in ${ledger} wallet.`); + throw new Error(`An account with this address already exists in your ${ledger} wallet.`); + } + if (existingAccounts[i].name === name) { + throw new Error(`An account named '${name}' already exists in your ${ledger} wallet.`); } } } diff --git a/packages/ui/src/components/AccountPreview.ts b/packages/ui/src/components/AccountPreview.ts index f1fc97ae..1078ee5b 100644 --- a/packages/ui/src/components/AccountPreview.ts +++ b/packages/ui/src/components/AccountPreview.ts @@ -41,18 +41,27 @@ const AccountPreview: FunctionalComponent = (props: any) => {