diff --git a/src/renderer/entities/contact/model/contact-model.ts b/src/renderer/entities/contact/model/contact-model.ts index 6f396cc90b..cc82c3d9fa 100644 --- a/src/renderer/entities/contact/model/contact-model.ts +++ b/src/renderer/entities/contact/model/contact-model.ts @@ -14,8 +14,8 @@ const createContactFx = createEffect(async (contact: Omit): Promi return storageService.contacts.create(contact); }); -const createContactsFx = createEffect((contacts: Omit[]): Promise[] => { - return contacts.map(async (contact) => storageService.contacts.create(contact)); +const createContactsFx = createEffect((contacts: Omit[]): Promise => { + return storageService.contacts.createAll(contacts); }); const updateContactFx = createEffect(async ({ id, ...rest }: Contact): Promise => { @@ -34,7 +34,7 @@ $contacts .on(populateContactsFx.doneData, (_, contacts) => { return contacts; }) - .on(createContactFx.doneData, (state, contact) => { + .on([createContactFx.doneData, createContactsFx.doneData], (state, contact) => { return contact ? state.concat(contact) : state; }) .on(deleteContactFx.doneData, (state, contactId) => { diff --git a/src/renderer/widgets/CreateWallet/ui/MultisigWallet/components/Signatory.tsx b/src/renderer/widgets/CreateWallet/ui/MultisigWallet/components/Signatory.tsx index 18085b1e44..93cf2b3215 100644 --- a/src/renderer/widgets/CreateWallet/ui/MultisigWallet/components/Signatory.tsx +++ b/src/renderer/widgets/CreateWallet/ui/MultisigWallet/components/Signatory.tsx @@ -224,7 +224,7 @@ export const Signatory = ({ placeholder={t('addressBook.createContact.namePlaceholder')} invalid={false} value={signatoryName} - disabled={!!ownAccountName || !!contactAccountName} + disabled={!!ownAccountName} onChange={onNameChange} />