diff --git a/package-lock.json b/package-lock.json index b29b52458..2b4263c1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,7 +114,7 @@ "xrpl": "^3.0.0-beta.1" }, "engines": { - "node": ">=18.0.0 <19", + "node": ">=20.x", "npm": ">=7.14.0 <10.0.0" } }, diff --git a/package.json b/package.json index 4d7e2c8f6..e056bcfa5 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ ], "prettier": "@xrplf/prettier-config", "engines": { - "node": ">=18.0.0 <19", + "node": ">=20.x", "npm": ">=7.14.0 <10.0.0" } } diff --git a/public/locales/en-US/translations.json b/public/locales/en-US/translations.json index 9d7630114..a62af3f2b 100644 --- a/public/locales/en-US/translations.json +++ b/public/locales/en-US/translations.json @@ -201,7 +201,8 @@ "invalid_transaction_hash": "The transaction hash is invalid", "ledger_not_found": "Ledger not Found", "check_ledger_id": "Please check your ledger id", - "server_ledgers_hint": "This node ({{connection.server.publicKey, truncate(length: 10)}}) only contains ledgers {{connection.ledger.validated}}", + "server_ledgers_hint": "This node only contains ledgers {{connection.ledger.validated}}", + "server_ledgers_hint_with_key": "This node ({{connection.server.publicKey, truncate(length: 10)}}) only contains ledgers {{connection.ledger.validated}}", "use_search": "Please use our search", "ledger_has_no_trans": "This ledger does not have any transactions", "less_than": "Less than", diff --git a/public/locales/es-ES/translations.json b/public/locales/es-ES/translations.json index 4c89774d3..45dd3b154 100644 --- a/public/locales/es-ES/translations.json +++ b/public/locales/es-ES/translations.json @@ -197,7 +197,8 @@ "invalid_transaction_hash": "El hash de la transacción es inválido", "ledger_not_found": "Libro Contable no Encontrado", "check_ledger_id": "Por favor, comprueba el id de tu libro contable", - "server_ledgers_hint": "Este nodo ({{connection.server.publicKey, truncate(length: 10)}}) solo contiene libros contables {{connection.ledger.validated}}", + "server_ledgers_hint": "Este nodo solo contiene libros contables {{connection.ledger.validated}}", + "server_ledgers_hint_with_key": null, "use_search": "Por favor, utiliza nuestra búsqueda", "ledger_has_no_trans": "Este libro contable no tiene ninguna transacción", "less_than": "Menos que", diff --git a/public/locales/fr-FR/translations.json b/public/locales/fr-FR/translations.json index 9134fd8df..9fd807c18 100644 --- a/public/locales/fr-FR/translations.json +++ b/public/locales/fr-FR/translations.json @@ -199,7 +199,8 @@ "invalid_transaction_hash": "Le hash de la transaction est invalide", "ledger_not_found": "Registre introuvable", "check_ledger_id": "Veuillez vérifier votre id de registre", - "server_ledgers_hint": "Ce nœud ({{connection.server.publicKey, truncate(length: 10)}}) ne contient que les registres {{connection.ledger.validated}}.", + "server_ledgers_hint": "Ce nœud ne contient que les registres {{connection.ledger.validated}}.", + "server_ledgers_hint_with_key": null, "use_search": "Merci d'utiliser notre outil de recherche", "ledger_has_no_trans": "Ce registre n'a aucune transaction.", "less_than": "Moins de", diff --git a/public/locales/ja-JP/translations.json b/public/locales/ja-JP/translations.json index 7d036a6ca..88a469e36 100644 --- a/public/locales/ja-JP/translations.json +++ b/public/locales/ja-JP/translations.json @@ -200,6 +200,7 @@ "ledger_not_found": "Ledgerが見つかりません", "check_ledger_id": "Ledger IDを確認してください", "server_ledgers_hint": null, + "server_ledgers_hint_with_key": null, "use_search": "検索機能をご利用ください", "ledger_has_no_trans": "Ledgerにはトランザクションがありません", "less_than": "未満", diff --git a/public/locales/ko-KR/translations.json b/public/locales/ko-KR/translations.json index 8a1790c07..08597d9bf 100644 --- a/public/locales/ko-KR/translations.json +++ b/public/locales/ko-KR/translations.json @@ -200,7 +200,8 @@ "invalid_transaction_hash": "트랜잭션 해시가 유효하지 않습니다", "ledger_not_found": "원장을 찾을 수 없습니다", "check_ledger_id": "원장 ID를 확인해주세요", - "server_ledgers_hint": "이 노드 ({{connection.server.publicKey, truncate(length: 10)}})는 {{connection.ledger.validated}} 원장만 포함하고 있습니다", + "server_ledgers_hint": "이 노드 는 {{connection.ledger.validated}} 원장만 포함하고 있습니다", + "server_ledgers_hint_with_key": null, "use_search": "검색을 이용해 주세요", "ledger_has_no_trans": "이 원장에는 어떠한 트랜잭션도 없습니다", "less_than": "미만", diff --git a/src/containers/NoMatch/index.tsx b/src/containers/NoMatch/index.tsx index 5d1e7ad0a..c18b78c79 100644 --- a/src/containers/NoMatch/index.tsx +++ b/src/containers/NoMatch/index.tsx @@ -25,7 +25,7 @@ const NoMatch = ({ title = 'not_found_default_title', hints = ['not_found_check_url'], isError = true, - warning = undefined, + warning, }: NoMatchProps) => { const { track } = useAnalytics() const { t } = useTranslation() @@ -40,20 +40,22 @@ const NoMatch = ({ }, [...hints, title, track]) const notFound = title.includes('not_found') - const hintMsg = hints.map((hint) => ( -
- {t(hint as any, values)} -
- )) - const derivedWarning = warning ?? (notFound && t('not_found')) + + const hintMsg = values.connection?.server?.publicKey + ? t('server_ledgers_hint_with_key', values) + : t('server_ledgers_hint', values) + + const derivedWarning = warning ?? (notFound ? t('not_found') : undefined) return (
{isError &&
{t('uh_oh')}
}
{t(title as any, values)}
- {hintMsg} - {(derivedWarning || isError) && ( + {/* Render hintMsg only if it exists */} + {hintMsg &&
{hintMsg}
} + {/* Render derivedWarning only if it exists */} + {derivedWarning && (