From 3570cfe15dedd087ec87f4c5588c63905d085a46 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 18 Sep 2023 13:12:49 -0230 Subject: [PATCH] Consolidate loops in address book migration --- app/store/migrations.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/store/migrations.js b/app/store/migrations.js index d88b4f96b655..4dad5088c1b2 100644 --- a/app/store/migrations.js +++ b/app/store/migrations.js @@ -671,13 +671,10 @@ export const migrations = { (chainId) => localChainIds.has(chainId), ); - if (recognizedChainIdCandidates.length > 1) { - for (const chainId of recognizedChainIdCandidates) { + for (const chainId of recognizedChainIdCandidates) { + if (recognizedChainIdCandidates.length > 1) { ambiguousAddressEntries[chainId] = Object.keys(addressEntries); } - } - - for (const chainId of recognizedChainIdCandidates) { migratedAddressBook[chainId] = mapValues(addressEntries, (entry) => ({ ...entry, chainId,