Skip to content

Commit

Permalink
CCheck for existence of network before updating preset
Browse files Browse the repository at this point in the history
  • Loading branch information
floating committed Aug 5, 2021
1 parent 26ef2cc commit 7d29014
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main/store/migrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,11 @@ const migrations = {
return initial
},
14: initial => {
const { primary, secondary } = initial.main.networks.ethereum[137].connection
if (primary.current === 'matic') primary.current = 'infura'
if (secondary.current === 'matic') secondary.current = 'infura'
if (initial.main.networks.ethereum[137] && initial.main.networks.ethereum[137].connection) {
const { primary, secondary } = initial.main.networks.ethereum[137].connection || {}
if (primary.current === 'matic') primary.current = 'infura'
if (secondary.current === 'matic') secondary.current = 'infura'
}

// add arbitrum network information
if (!initial.main.networks.ethereum[42161]) {
Expand Down

0 comments on commit 7d29014

Please sign in to comment.