-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render error tx844 #898
base: staging
Are you sure you want to change the base?
Render error tx844 #898
Changes from all commits
9db41c9
908494f
32ef2c6
f1f03d1
59d96b7
8dbf4b8
e619909
7839eb0
2c74698
5470806
df54121
d05d2e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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}}", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, just a note, if you are unsure about the translations in other languages, you can set them to |
||
"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", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) => ( | ||
<div className="hint" key={hint}> | ||
{t(hint as any, values)} | ||
</div> | ||
)) | ||
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 ( | ||
<div className="no-match"> | ||
<Helmet title={t(title as any)} /> | ||
{isError && <div className="uh-oh">{t('uh_oh')}</div>} | ||
<div className="title">{t(title as any, values)}</div> | ||
{hintMsg} | ||
{(derivedWarning || isError) && ( | ||
{/* Render hintMsg only if it exists */} | ||
{hintMsg && <div className="hint">{hintMsg}</div>} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why we need to change here. Would There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will implement the suggested change in the next commit |
||
{/* Render derivedWarning only if it exists */} | ||
{derivedWarning && ( | ||
<div className="warning"> | ||
<InfoIcon title={derivedWarning} /> | ||
| ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still want the pubkey to be printed if it's available, with some sort of "This Clio node only..." alternate message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, you're saying that the clio-node-part still needs to be present in the code. What if I change the code such that whenever the pubKey is not empty, it gets displayed. But when it is empty, print it as "This clio node only..."
Would that be viable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, something like that sounds good.