Skip to content

Commit

Permalink
Merge pull request #20 from bnb-chain/perf-pop
Browse files Browse the repository at this point in the history
perf:pop
  • Loading branch information
constwz authored Jan 15, 2024
2 parents d278568 + 54a5114 commit 0767d97
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions src/hooks/useSafeNotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ const useSafeNotifications = (): void => {
link: isUnsupported
? CLI_LINK
: {
href: {
pathname: AppRoutes.settings.setup,
query: { safe: query.safe },
},
title: 'Update Safe Account',
href: {
pathname: AppRoutes.settings.setup,
query: { safe: query.safe },
},
title: 'Update Safe Account',
},

onClose: () => dismissUpdateNotification(OUTDATED_VERSION_KEY),
}),
Expand All @@ -132,24 +132,24 @@ const useSafeNotifications = (): void => {
* Show a notification when the Safe master copy is not supported
*/

useEffect(() => {
if (isValidMasterCopy(safe.implementationVersionState)) return

const id = dispatch(
showNotification({
variant: 'warning',
message: `This Safe Account was created with an unsupported base contract.
The web interface might not work correctly.
We recommend using the command line interface instead.`,
groupKey: 'invalid-mastercopy',
link: CLI_LINK,
}),
)

return () => {
dispatch(closeNotification({ id }))
}
}, [dispatch, safe.implementationVersionState])
// useEffect(() => {
// if (isValidMasterCopy(safe.implementationVersionState)) return

// const id = dispatch(
// showNotification({
// variant: 'warning',
// message: `This Safe Account was created with an unsupported base contract.
// The web interface might not work correctly.
// We recommend using the command line interface instead.`,
// groupKey: 'invalid-mastercopy',
// link: CLI_LINK,
// }),
// )

// return () => {
// dispatch(closeNotification({ id }))
// }
// }, [dispatch, safe.implementationVersionState])
}

export default useSafeNotifications

0 comments on commit 0767d97

Please sign in to comment.