feat(validators): display base_fee in drops on Fee Voting table (#1206)#1318
Open
tmchow wants to merge 2 commits intoripple:mainfrom
Open
feat(validators): display base_fee in drops on Fee Voting table (#1206)#1318tmchow wants to merge 2 commits intoripple:mainfrom
tmchow wants to merge 2 commits intoripple:mainfrom
Conversation
a9e14bc to
68fedb7
Compare
Base fee values are small (typically 10 drops) and displaying them as
XRP ("0.00001 XRP") made the number hard to read at a glance. Render
the base_fee column and the base_fee metric on VotingTab as drops
instead ("10 drops") while leaving reserve_base and reserve_inc on XRP,
where the values are large enough to remain readable. Adds a `drops`
string to the en-US translation bundle.
Closes ripple#1206
68fedb7 to
329378c
Compare
mvadari
reviewed
May 5, 2026
| "missed_validations": "{{count}} missed validations", | ||
| "incomplete": "incomplete", | ||
| "base_fee": "Base Fee", | ||
| "drops": "drops", |
Collaborator
There was a problem hiding this comment.
Please add the null keys in the other languages
Author
There was a problem hiding this comment.
Done in 2cf8686. Added "drops": null to ja-JP, ko-KR, es-ES, fr-FR, ca-CA, and my-MM right after each locale's base_fee key. They keep falling back to the en-US string via fallbackLng: 'en-US' until translations land.
Adds "drops": null to ja-JP, ko-KR, es-ES, fr-FR, ca-CA, and my-MM so translators see an explicit slot for the key introduced in the en-US bundle for the Fee Voting table. Each locale continues to fall back to the English string via fallbackLng: 'en-US' until a translation lands. Addresses review feedback on PR ripple#1318.
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.
High Level Overview of Change
Closes #1206.
Renders validator
base_feein drops on both the Validators Fee Voting table and the Validator detail page's voting tab (for example10 dropsinstead of0.00001XRP). Reserve voting columns (reserve_base,reserve_inc) keep their XRP formatting because those values are large enough to read as XRP already.Context of Change
The Fee Voting table's
base_feecolumn goes throughrenderFeeVotinginsrc/containers/Network/ValidatorsTable.tsx, which converts the raw drops value to XRP and runs it throughrenderXRP. Forreserve_baseandreserve_incthat produces readable amounts (1.00,0.20), butbase_feedefaults to 10 drops and surfaces as0.00001, which is harder to scan and disconnected from how validator operators actually talk about the reference fee.The fix gates the XRP conversion on the column's className. When the cell renders the
base_feecolumn, show the raw drops value with a translateddropssuffix; otherwise, keep the existing XRP path untouched. The same rule is applied to thebase_feecell onVotingTab.tsxso the individual validator page stays consistent with the table.I also added a
dropsstring topublic/locales/en-US/translations.json. Other locale bundles fall back to the English string via the project's existingfallbackLng: 'en-US'configuration until translators catch up.Type of Change
Codebase Modernization
Before / After
Before: the
BASE FEEcell on the validators Fee Voting table and on the individual validator's voting tab rendered0.00001for a typical 10-drop reference fee, because the value was divided byDROPS_TO_XRP_FACTORand formatted throughrenderXRP. Downward/upward vote indicators still rendered, but the magnitude was hard to read at a glance.After: the same cells render
10 drops(or whatever drops value the validator is voting for). Vote direction indicators are unchanged. Reserve columns (base,owner) continue to use the XRP formatting because those values are large enough to read as XRP.Test Plan
npx jest --env=jsdom --testPathPatterns='Validators|Voting'— 6 test suites, 21 tests passing.validatorsTable.test.jsnow asserts'10 drops'for thetd.base_feecell (was'0.00001').VotingTab.test.tsxnow asserts'10 drops'for the first.metrics .cell(was'0.00001').Future Tasks
dropstranslations to the other locale bundles (ja-JP,ko-KR,es-ES,fr-FR,ca-CA,my-MM). Until then those locales fall back to the English string via the project's existingfallbackLng: 'en-US'configuration.