Skip to content

Commit 9e7dc5d

Browse files
authored
Merge branch 'develop' into fix-dao
2 parents e4ae783 + 2fdd807 commit 9e7dc5d

File tree

1 file changed

+13
-11
lines changed
  • packages/neuron-ui/src/containers/Navbar

1 file changed

+13
-11
lines changed

packages/neuron-ui/src/containers/Navbar/index.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,7 @@ const Navbar = () => {
125125
return
126126
}
127127

128-
// isUpdated is true or version is not empty means check update has return
129-
if (!verifyCkbResult || (isUpdated !== true && !version)) {
130-
return
131-
}
132-
if (version && verifyCkbResult.shouldUpdate) {
133-
showGlobalAlertDialog({
134-
type: 'warning',
135-
message: t('navbar.update-neuron-with-ckb', { version: getVersion() }),
136-
action: 'ok',
137-
})(dispatch)
138-
} else if (!verifyCkbResult.ckbIsCompatible) {
128+
if (verifyCkbResult && !verifyCkbResult.ckbIsCompatible) {
139129
showGlobalAlertDialog({
140130
type: 'warning',
141131
message: (
@@ -152,6 +142,18 @@ const Navbar = () => {
152142
action: 'ok',
153143
})(dispatch)
154144
}
145+
146+
// isUpdated is true or version is not empty means check update has return
147+
if (!verifyCkbResult || (isUpdated !== true && !version)) {
148+
return
149+
}
150+
if (version && verifyCkbResult.shouldUpdate) {
151+
showGlobalAlertDialog({
152+
type: 'warning',
153+
message: t('navbar.update-neuron-with-ckb', { version: getVersion() }),
154+
action: 'ok',
155+
})(dispatch)
156+
}
155157
}, [verifyCkbResult, version, isUpdated])
156158

157159
useEffect(() => {

0 commit comments

Comments
 (0)