From 329378cafad20a5b0bc9bda4946f9a08baad371b Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Thu, 23 Apr 2026 05:58:23 -0700 Subject: [PATCH 1/2] feat(validators): display base_fee in drops on Fee Voting table 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 #1206 --- public/locales/en-US/translations.json | 1 + src/containers/Network/ValidatorsTable.tsx | 6 +++++- src/containers/Network/test/validatorsTable.test.js | 2 +- src/containers/Validators/VotingTab.tsx | 2 +- src/containers/Validators/test/VotingTab.test.tsx | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/public/locales/en-US/translations.json b/public/locales/en-US/translations.json index a6d95c18f..dbd17e033 100644 --- a/public/locales/en-US/translations.json +++ b/public/locales/en-US/translations.json @@ -386,6 +386,7 @@ "missed_validations": "{{count}} missed validations", "incomplete": "incomplete", "base_fee": "Base Fee", + "drops": "drops", "account_reserve": "Account Reserve", "object_reserve": "Object Reserve", "vote": "Vote", diff --git a/src/containers/Network/ValidatorsTable.tsx b/src/containers/Network/ValidatorsTable.tsx index 89375d928..92e035caf 100644 --- a/src/containers/Network/ValidatorsTable.tsx +++ b/src/containers/Network/ValidatorsTable.tsx @@ -88,7 +88,11 @@ export const ValidatorsTable = (props: ValidatorsTableProps) => { ))} - {renderXRP(data / DROPS_TO_XRP_FACTOR, language)} + {className === 'base_fee' ? ( + {`${data} ${t('drops')}`} + ) : ( + {renderXRP(data / DROPS_TO_XRP_FACTOR, language)} + )} ) : ( diff --git a/src/containers/Network/test/validatorsTable.test.js b/src/containers/Network/test/validatorsTable.test.js index 22b1d26b4..07954f840 100644 --- a/src/containers/Network/test/validatorsTable.test.js +++ b/src/containers/Network/test/validatorsTable.test.js @@ -51,7 +51,7 @@ describe('Validators table', () => { '0.20', ) expect(container.querySelector('td.base_fee').textContent.trim()).toContain( - '0.00001', + '10 drops', ) }) }) diff --git a/src/containers/Validators/VotingTab.tsx b/src/containers/Validators/VotingTab.tsx index 1ced8cf86..cd64a04e0 100644 --- a/src/containers/Validators/VotingTab.tsx +++ b/src/containers/Validators/VotingTab.tsx @@ -89,7 +89,7 @@ export const VotingTab: FC<{
{t('base_fee')}
-
{renderXRP(validatorData.base_fee / XRP_BASE)}
+
{`${validatorData.base_fee} ${t('drops')}`}
{t('account_reserve')}
diff --git a/src/containers/Validators/test/VotingTab.test.tsx b/src/containers/Validators/test/VotingTab.test.tsx index ffe24fdd2..76cbef076 100644 --- a/src/containers/Validators/test/VotingTab.test.tsx +++ b/src/containers/Validators/test/VotingTab.test.tsx @@ -67,7 +67,7 @@ describe('VotingTab container', () => { // Render fees voting correctly const cells = container.querySelectorAll('.metrics .cell') - expect(cells[0].innerHTML).toContain('0.00001') + expect(cells[0].innerHTML).toContain('10 drops') expect(cells[1].innerHTML).toContain('10.00') expect(cells[2].innerHTML).toContain('2.00') From 2cf8686ca1321bf63b1a153a3281ead53ae2f3f8 Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Tue, 5 May 2026 11:43:20 -0700 Subject: [PATCH 2/2] chore(i18n): add drops key placeholders for non-English locales 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 #1318. --- public/locales/ca-CA/translations.json | 1 + public/locales/es-ES/translations.json | 1 + public/locales/fr-FR/translations.json | 1 + public/locales/ja-JP/translations.json | 1 + public/locales/ko-KR/translations.json | 1 + public/locales/my-MM/translations.json | 1 + 6 files changed, 6 insertions(+) diff --git a/public/locales/ca-CA/translations.json b/public/locales/ca-CA/translations.json index 8ab3e03a7..528b64c15 100644 --- a/public/locales/ca-CA/translations.json +++ b/public/locales/ca-CA/translations.json @@ -385,6 +385,7 @@ "missed_validations": "{{count}} validacions perdudes", "incomplete": "incomplet", "base_fee": "Comissío Base", + "drops": null, "account_reserve": "Reserva de Compte", "object_reserve": "Reserva d'Objectes", "vote": "Vota", diff --git a/public/locales/es-ES/translations.json b/public/locales/es-ES/translations.json index fd75401d4..14dc1ed17 100644 --- a/public/locales/es-ES/translations.json +++ b/public/locales/es-ES/translations.json @@ -386,6 +386,7 @@ "missed_validations": "{{count}} validaciones perdidas", "incomplete": "incompleto", "base_fee": null, + "drops": null, "account_reserve": null, "object_reserve": null, "vote": null, diff --git a/public/locales/fr-FR/translations.json b/public/locales/fr-FR/translations.json index cf8caa92d..5eaaf40a9 100644 --- a/public/locales/fr-FR/translations.json +++ b/public/locales/fr-FR/translations.json @@ -386,6 +386,7 @@ "missed_validations": "{{count}} validations manquées", "incomplete": "incomplet", "base_fee": null, + "drops": null, "account_reserve": null, "object_reserve": null, "vote": null, diff --git a/public/locales/ja-JP/translations.json b/public/locales/ja-JP/translations.json index fca14b47c..0a91db87f 100644 --- a/public/locales/ja-JP/translations.json +++ b/public/locales/ja-JP/translations.json @@ -386,6 +386,7 @@ "missed_validations": "バリデーション失敗数:{{count}}", "incomplete": null, "base_fee": "基本手数料", + "drops": null, "account_reserve": "アカウント準備金", "object_reserve": "オブジェクト準備金", "vote": "投票", diff --git a/public/locales/ko-KR/translations.json b/public/locales/ko-KR/translations.json index da64a4c6d..4f7176415 100644 --- a/public/locales/ko-KR/translations.json +++ b/public/locales/ko-KR/translations.json @@ -386,6 +386,7 @@ "missed_validations": "{{count}}회의 유효성 검증이 누락되었습니다", "incomplete": "미완료", "base_fee": null, + "drops": null, "account_reserve": null, "object_reserve": null, "vote": null, diff --git a/public/locales/my-MM/translations.json b/public/locales/my-MM/translations.json index f83c121c6..380269c93 100644 --- a/public/locales/my-MM/translations.json +++ b/public/locales/my-MM/translations.json @@ -386,6 +386,7 @@ "missed_validations": "{{count}} ခု အတည်ပြုမှု လွဲချော်", "incomplete": "မပြီးပြည့်စုံ", "base_fee": "အခြေခံ အခကြေးငွေ", + "drops": null, "account_reserve": "အကောင့် သီးသန့်ငွေ", "object_reserve": "အရာဝတ္ထု သီးသန့်ငွေ", "vote": "မဲပေးရန်",