From d0293fb3e28f120b4ea493dbad08d73abb74f0a6 Mon Sep 17 00:00:00 2001 From: lukaw3d Date: Thu, 19 Oct 2023 20:43:06 +0200 Subject: [PATCH 1/2] Fix contacts suggestions with duplicate names --- .../pages/AccountPage/Features/SendTransaction/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/pages/AccountPage/Features/SendTransaction/index.tsx b/src/app/pages/AccountPage/Features/SendTransaction/index.tsx index e1296816db..b1f2088b2a 100644 --- a/src/app/pages/AccountPage/Features/SendTransaction/index.tsx +++ b/src/app/pages/AccountPage/Features/SendTransaction/index.tsx @@ -85,9 +85,11 @@ export function SendTransaction(props: SendTransactionProps) { > contact.name)} + suggestions={contacts.map(contact => ({ label: contact.name, value: contact.address }))} onSuggestionSelect={event => - setRecipient(contacts.find(contact => contact.name === event.suggestion)?.address || '') + setRecipient( + contacts.find(contact => contact.address === event.suggestion?.value)?.address || '', + ) } name="recipient" value={recipient} From 296f5e64e33831788a78016972b3f39125ce1cb4 Mon Sep 17 00:00:00 2001 From: lukaw3d Date: Thu, 19 Oct 2023 20:54:11 +0200 Subject: [PATCH 2/2] Fix contacts syncing to new tab --- .changelog/1735.bugfix.md | 1 + src/app/state/persist/syncTabs.ts | 1 + 2 files changed, 2 insertions(+) create mode 100644 .changelog/1735.bugfix.md diff --git a/.changelog/1735.bugfix.md b/.changelog/1735.bugfix.md new file mode 100644 index 0000000000..90ad1660f9 --- /dev/null +++ b/.changelog/1735.bugfix.md @@ -0,0 +1 @@ +Fix contacts syncing to new tab diff --git a/src/app/state/persist/syncTabs.ts b/src/app/state/persist/syncTabs.ts index 2c8a93a419..be00d7a42e 100644 --- a/src/app/state/persist/syncTabs.ts +++ b/src/app/state/persist/syncTabs.ts @@ -31,6 +31,7 @@ export function receiveInitialTabSyncState( ...prevState, theme: initialSyncState.theme, wallet: initialSyncState.wallet, + contacts: initialSyncState.contacts, network: initialSyncState.network, persist: initialSyncState.persist, }