Skip to content

fix(protocol-dashboard): fetch latest validator version via getNumberOfVersions#14355

Merged
raymondjacobson merged 1 commit into
mainfrom
claude/youthful-goldwasser-afa0d8
May 19, 2026
Merged

fix(protocol-dashboard): fetch latest validator version via getNumberOfVersions#14355
raymondjacobson merged 1 commit into
mainfrom
claude/youthful-goldwasser-afa0d8

Conversation

@raymondjacobson
Copy link
Copy Markdown
Member

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

…OfVersions

getCurrentVersion on the ServiceTypeManager contract was returning a stale
version (1.0.0) for the Validator service type. Switch to reading the
latest registered version by calling getNumberOfVersions and then
getVersion(numberOfVersions - 1).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 19, 2026

⚠️ No Changeset found

Latest commit: e1415ac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@raymondjacobson raymondjacobson merged commit de7e3f9 into main May 19, 2026
3 checks passed
@raymondjacobson raymondjacobson deleted the claude/youthful-goldwasser-afa0d8 branch May 19, 2026 02:09
raymondjacobson added a commit that referenced this pull request May 19, 2026
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant