Commit de7e3f9
fix(protocol-dashboard): fetch latest validator version via getNumberOfVersions (#14355)
## Summary
- `getCurrentVersion` on the ServiceTypeManager contract was returning a
stale version (1.0.0) for the `Validator` service type — the home page
and other locations using `useCurrentVersion(ServiceType.Validator)`
displayed the wrong number.
- Switch `fetchCurrentVersion` to read the latest registered version by
calling `getNumberOfVersions(serviceType)` and then
`getVersion(serviceType, numberOfVersions - 1)`. The latest onchain
validator version (1.1.0) now shows correctly.
## Test plan
- [ ] Open the dashboard logged out — verify the `Register a Node` card
shows the latest onchain version (currently `1.1.0`) instead of `1.0.0`.
- [ ] Open a user/services page that renders `RegisterNodeCard` — verify
the same.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent c93a265 commit de7e3f9
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
0 commit comments