Commit 2e77a41
fix(protocol-dashboard): remove '1.0.0' validator-version fallback so fetch actually runs (#14356)
## Summary
Follow-up to #14355. The dashboard was still showing `1.0.0` for the
Validator current version after that PR shipped. Root cause: the
`getCurrentVersion` selector returned `'1.0.0'` as a fallback when
`services.validator.currentVersion` was undefined, and
`useCurrentVersion` only dispatches `fetchCurrentVersion` when the
selected value is `undefined`. The hardcoded fallback short-circuited
the dispatch, so the new `getNumberOfVersions` + `getVersion` logic
introduced in #14355 never ran.
- Remove the `?? '1.0.0'` fallback from the selector so the fetch
dispatches.
- Harden the `setCurrentVersion` reducer to initialize
`state.services.validator` if it doesn't exist yet, since
`fetchCurrentVersion` can resolve before `fetchServiceStakeValues`
populates it.
## Test plan
- [ ] Open the dashboard and confirm `Register a Node` → `Current
Version` shows the latest onchain version (currently `1.1.0`) instead of
`1.0.0`.
- [ ] Hard refresh and confirm no race-condition crashes from
`setCurrentVersion` running before service info loads.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 380e538 commit 2e77a41
3 files changed
Lines changed: 22 additions & 7 deletions
File tree
- packages/protocol-dashboard/src
- components/RegisterNodeCard
- store/cache/protocol
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
Lines changed: 20 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
61 | 70 | | |
62 | 71 | | |
63 | 72 | | |
| |||
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
85 | | - | |
86 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
87 | 102 | | |
88 | 103 | | |
89 | 104 | | |
| |||
0 commit comments