Skip to content

feat(explorer): resolve candidate validators#11124

Draft
KeitoTadashi wants to merge 9 commits intodevelopfrom
tooling-explorer/restore-inactive-validators
Draft

feat(explorer): resolve candidate validators#11124
KeitoTadashi wants to merge 9 commits intodevelopfrom
tooling-explorer/restore-inactive-validators

Conversation

@KeitoTadashi
Copy link
Copy Markdown
Contributor

@KeitoTadashi KeitoTadashi commented Apr 6, 2026

Description of change

provide expected result
imagen

Links to any relevant issues

fixes #11123

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

@KeitoTadashi KeitoTadashi requested a review from a team as a code owner April 6, 2026 14:34
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
apps-backend Ready Ready Preview, Comment Apr 13, 2026 3:20pm
iota-evm-bridge Ready Ready Preview, Comment Apr 13, 2026 3:20pm
rebased-explorer Error Error Apr 13, 2026 3:20pm
wallet-dashboard Ready Ready Preview, Comment Apr 13, 2026 3:20pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
apps-ui-kit Ignored Ignored Preview, Comment Apr 13, 2026 3:20pm
iota-multisig-toolkit Ignored Ignored Preview Apr 13, 2026 3:20pm

Request Review

Copy link
Copy Markdown
Member

@begonaalvarezd begonaalvarezd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, the solution should be done to consider candidate validators, not extending inactive ones, since candidates are not really inactive

@KeitoTadashi KeitoTadashi marked this pull request as draft April 8, 2026 11:10
Comment on lines +30 to +38
const allCandidates: IotaValidatorSummaryExtended[] = sanitizeValidatorObjects(
candidateObjects,
{ isCandidate: true },
);

const data = validatorAddress
? allCandidates.filter((v) => v.iotaAddress === validatorAddress)
: allCandidates;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer mapping the data in the query's select() method instead

? activeValidators?.concat(sanitizedPendingValidatorsData)
: activeValidators
: [];
const allValidators = useMemo(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the useMemo, it hurts more than it helps

Comment on lines +35 to +37
const data = validatorAddress
? allCandidates.filter((v) => v.iotaAddress === validatorAddress)
: allCandidates;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why filter instead of find? You only want one

Suggested change
const data = validatorAddress
? allCandidates.filter((v) => v.iotaAddress === validatorAddress)
: allCandidates;
const data = validatorAddress
? allCandidates.find((v) => v.iotaAddress === validatorAddress)
: null;

Comment on lines +482 to +487
function parseBigIntSafe(value: string | undefined | null): bigint {
try {
return BigInt(value ?? 0);
} catch {
return 0n;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this now suddenly used for everything? Why would a field be missing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ill take another look here

@vercel vercel bot temporarily deployed to Preview – wallet-dashboard April 9, 2026 15:59 Inactive
@vercel vercel bot temporarily deployed to Preview – iota-multisig-toolkit April 9, 2026 15:59 Inactive
@vercel vercel bot temporarily deployed to Preview – apps-backend April 9, 2026 16:00 Inactive
@vercel vercel bot temporarily deployed to Preview – iota-evm-bridge April 9, 2026 16:00 Inactive
@vercel vercel bot temporarily deployed to Preview – iota-evm-bridge April 10, 2026 06:53 Inactive
@vercel vercel bot temporarily deployed to Preview – apps-backend April 10, 2026 06:53 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-dashboard April 10, 2026 06:53 Inactive
@vercel vercel bot temporarily deployed to Preview – iota-multisig-toolkit April 10, 2026 06:53 Inactive
@KeitoTadashi KeitoTadashi marked this pull request as draft April 10, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

explorer Issues related to the Explorer tooling Issues related to the Tooling team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve candidate validators

4 participants