Skip to content

feat(explorer): resolve candidate validators#11124

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

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 iotaledger/ts-packages#59

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

@iota-ci iota-ci added the tooling Issues related to the Tooling team label Apr 6, 2026
@vercel vercel Bot temporarily deployed to Preview – apps-backend April 6, 2026 14:34 Inactive
@vercel vercel Bot temporarily deployed to Preview – rebased-explorer April 6, 2026 14:35 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge April 6, 2026 14:35 Inactive
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard April 6, 2026 14:36 Inactive
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

@vercel vercel Bot temporarily deployed to Preview – iota-multisig-toolkit April 8, 2026 09:37 Inactive
@github-actions github-actions Bot added the explorer Issues related to the Explorer label Apr 8, 2026
@KeitoTadashi KeitoTadashi changed the title feat(explorer): bring back inactive validators feat(explorer): resolve candidate validators Apr 8, 2026
@vercel vercel Bot temporarily deployed to Preview – apps-backend April 8, 2026 09:38 Inactive
@vercel vercel Bot temporarily deployed to Preview – rebased-explorer April 8, 2026 09:38 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge April 8, 2026 09:38 Inactive
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard April 8, 2026 09:39 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-multisig-toolkit April 8, 2026 09:47 Inactive
@vercel vercel Bot temporarily deployed to Preview – apps-backend April 8, 2026 09:48 Inactive
@vercel vercel Bot temporarily deployed to Preview – rebased-explorer April 8, 2026 09:48 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge April 8, 2026 09:48 Inactive
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard April 8, 2026 09:48 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-multisig-toolkit April 8, 2026 10:11 Inactive
@vercel vercel Bot temporarily deployed to Preview – apps-backend April 8, 2026 10:12 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge April 8, 2026 10:12 Inactive
@vercel vercel Bot temporarily deployed to Preview – rebased-explorer April 8, 2026 10:12 Inactive
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard April 8, 2026 10:12 Inactive
@KeitoTadashi KeitoTadashi marked this pull request as ready for review April 8, 2026 15:12
@vercel vercel Bot temporarily deployed to Preview – iota-multisig-toolkit April 8, 2026 15:13 Inactive
@vercel vercel Bot temporarily deployed to Preview – apps-backend April 8, 2026 15:14 Inactive
@vercel vercel Bot temporarily deployed to Preview – rebased-explorer April 8, 2026 15:14 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge April 8, 2026 15:15 Inactive
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard April 8, 2026 15:15 Inactive
@marc2332 marc2332 requested a review from begonaalvarezd April 9, 2026 07:16
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 – rebased-explorer April 9, 2026 16:01 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
@vercel vercel Bot temporarily deployed to Preview – rebased-explorer April 10, 2026 06:54 Inactive
@KeitoTadashi KeitoTadashi marked this pull request as draft April 10, 2026 13:17
@vercel vercel Bot temporarily deployed to Preview – apps-backend April 13, 2026 15:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – rebased-explorer April 13, 2026 15:19 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge April 13, 2026 15:19 Inactive
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard April 13, 2026 15:20 Inactive
@KeitoTadashi
Copy link
Copy Markdown
Contributor Author

closed in favor of iotaledger/ts-packages#59

@KeitoTadashi KeitoTadashi deleted the tooling-explorer/restore-inactive-validators branch April 23, 2026 07:18
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