Skip to content

Conversation

@ckeshava
Copy link
Contributor

@ckeshava ckeshava commented Aug 8, 2025

High Level Overview of Change

This is the work of @ckniffen. Many thanks. I'd like to open a PR to understand/discuss it better.

Github doesn't let me comment/review files well without a PR. The PR description will be updated in a few days.

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Translation Updates
  • Release

Codebase Modernization

  • Updated files to React Hooks
  • Updated files to TypeScript
  • Updated tests to React Testing Library

Before / After

Test Plan

Copy link
Contributor Author

@ckeshava ckeshava left a comment

Choose a reason for hiding this comment

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

These are notes for myself -- I'd like to address/work on these points before merging this PR.

transactions: any[]
index: number
hashes: LedgerHash[]
seen: number
Copy link
Contributor Author

@ckeshava ckeshava Aug 8, 2025

Choose a reason for hiding this comment

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

The Ledger xrpl.js type already contains some of these fields, except for seen. It is worthwhile to see if we can re-use that type. Here is the source file.

Comment on lines +52 to 55
&.tooltip-paystring {
width: 274px;
font-size: 12px;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

paystring project has been deprecated for a few years. This css section can be removed.

import PayStringLogomark from '../../shared/images/PayString_Logomark.png'
import QuestIcon from '../../shared/images/hover_question.svg'
import Tooltip from '../../shared/components/Tooltip'
import { Tooltip } from '../../shared/components/Tooltip/Tooltip'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

PayString related files are not used anymore in the Explorer code base.

function updateMetrics() {
const ledgerChain = Object.values(ledgers)
.sort((a, b) => a.index - b.index)
.slice(-100)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: The tooltip on the Explorer website mentions the last 50 ledgers being used for these metrics. This value needs to be updated.

import successIcon from '../../images/success.png'
import { localizeDate } from '../../utils'
import '../../css/tooltip.scss'
import PayStringToolTip from '../../images/paystring_tooltip.svg'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Paystring portion of the code needs to be deleted.

)}
<RouteLink
to={VALIDATOR_ROUTE}
params={{ identifier: selectedValidator }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The hyperlink to the validators page results in an error. This needs to be rectified.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants