Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for resolver migration. Add default array #600

Merged
merged 1 commit into from
Feb 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/api/manager/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,9 @@ const resolvers = {
'0x6dbc5978711cb22d7ba611bc18cec308ea12ea95',
'0xbf80bc10d6ebfee11bea9a157d762110a0b73d95'
]
const localResolvers =
process.env.REACT_APP_OLD_CONTENT_RESOLVERS &&
process.env.REACT_APP_OLD_CONTENT_RESOLVERS.split(',')
const localResolvers = process.env.REACT_APP_OLD_CONTENT_RESOLVERS
? process.env.REACT_APP_OLD_CONTENT_RESOLVERS.split(',')
: []

const oldResolvers = [...oldContentResolvers, ...localResolvers].map(
a => {
Expand Down Expand Up @@ -707,7 +707,7 @@ const resolvers = {
getAllRecords(name, isOldContentResolver),
getAllRecordsNew(name, publicResolver)
])
console.log('***', JSON.stringify({ records, newResolverRecords }))

// compare new and old records
if (!areRecordsEqual(records, newResolverRecords)) {
//get the transaction by using contract.method.encode from ethers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function MigrateResolver({ value, name, refetch, isOwner }) {

useEffect(() => {
if (mutationError) setIsErrorModalOpen(true)
}, mutationError)
}, [mutationError])

return (
<MigrateItem>
Expand Down