Conversation
* Dashboard network svgs * fixes
* get active validators * validators beacon calls * rm logs * isLoading fix * gweiToToken util * liveness query fix * update comments
* rm logs from validators calls * signer status calls * signer error cards
* db get and set calls * use BeaconchaConsent calls * mock-backend fix * rm useEffect * reorder imports
* dashbaord pkgs links * fix types
Marketen
requested changes
Feb 11, 2026
|
|
||
| const slotStr = headJson?.data?.header?.message?.slot; | ||
| if (!slotStr) throw new Error(`Beacon API ${network} headers/head missing data.header.message.slot`); | ||
| fetchAttestingPubkeysForBatch; |
Contributor
There was a problem hiding this comment.
what does this line do? seems weird
| startingBlock = parseInt(syncing.startingBlock, 16); | ||
| currentBlock = parseInt(syncing.currentBlock, 16); | ||
| highestBlock = parseInt(syncing.highestBlock, 16); | ||
| progress = ((currentBlock - startingBlock) / (highestBlock - startingBlock)) * 100; |
Contributor
There was a problem hiding this comment.
would be nice to do some sanity checks here
- only do the division if all variables (current block, starting block, highest block...) exist and are numbres
- if
highestBlock === startingBlock, we would be dividing by 0.
Comment on lines
+176
to
+181
| if (syncing.is_syncing === false) { | ||
| progress = 100; | ||
| } else { | ||
| // Calculate progress based on slots | ||
| progress = 100; | ||
| } |
Contributor
There was a problem hiding this comment.
this if else is redundant, its always 100. TODO calculate progress?
Comment on lines
+225
to
+235
| export async function nodeStatusGetByNetwork({ networks }: { networks: DashboardSupportedNetwork[] }) { | ||
| const resultsByNetwork: NodeStatusByNetwork = {}; | ||
|
|
||
| for (const network of networks) { | ||
| const ec = await getEcData(network); | ||
| const cc = await getCcData(network); | ||
| resultsByNetwork[network] = { ec, cc }; | ||
| } | ||
|
|
||
| return resultsByNetwork; | ||
| } |
Contributor
There was a problem hiding this comment.
these calls are done sequentially. Ideally should be done in parallel and print as soon as any CC/EC data starts being returned (use promise.all)
If returned data are errors, it should be treated to show the erros in the UI.
Contributor
|
|
||
| return { name: clientName }; | ||
| } catch (e) { | ||
| console.error(`Error getting EC version: ${e}`); |
|
|
||
| return { isSynced, currentBlock, progress }; | ||
| } catch (e) { | ||
| console.error(`Error getting EC data: ${e}`); |
| const peersData = await peersResponse.json(); | ||
| return peersData.result ? parseInt(peersData.result, 16) : 0; | ||
| } catch (error) { | ||
| console.error(`Error getting EC peers: ${error}`); |
|
|
||
| return { name: clientName }; | ||
| } catch (e) { | ||
| console.error(`Error getting CC data: ${e}`); |
| const peersData = await peersResponse.json(); | ||
| return peersData.data.connected; | ||
| } catch (error) { | ||
| console.error(`Error getting CC peers: ${error}`); |
Marketen
requested changes
Feb 11, 2026
Staking Dashboard fixes
Marketen
approved these changes
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Staking dashboard