Skip to content

Commit

Permalink
Consolidate loops in address book migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Gudahtt committed Sep 21, 2023
1 parent 42ba925 commit 3570cfe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/store/migrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3570cfe

Please sign in to comment.