Skip to content

Commit c5c7342

Browse files
committed
Merge branch 'staging' into entry-page
2 parents 83b8d66 + fbc98fe commit c5c7342

File tree

17 files changed

+117
-76
lines changed

17 files changed

+117
-76
lines changed

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"chopa",
5959
"chopb",
6060
"cimode",
61-
"Clawback",
61+
"clawback",
6262
"clsx",
6363
"ctid",
6464
"CUSTOMNETWORK",
@@ -76,13 +76,16 @@
7676
"nftoken",
7777
"nodemodules",
7878
"pageview",
79+
"paychannel",
7980
"paychannels",
80-
"Permissioned",
81+
"permissioned",
82+
"setfee",
8183
"stylelint",
8284
"svgr",
8385
"topojson",
8486
"trustlines",
8587
"Txns",
88+
"unauth",
8689
"VITE",
8790
"Xahau",
8891
"xchain",

public/locales/ca-CA/translations.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"30D": "30D",
3838
"total_transactions": "# de Txns",
3939
"total_fees": "Total de comissions",
40-
"async_component_timedout": "La càrrega del component ha trigat més del que s'esperava",
4140
"async_component_failed": "Error en carregar el component",
4241
"account_not_found": "No s'ha trobat el compte",
4342
"account_empty_title": "No s'ha proporcionat l'ID del compte",

public/locales/en-US/translations.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"30D": "30D",
3939
"total_transactions": "# of Txns",
4040
"total_fees": "Total Fees",
41-
"async_component_timedout": "Loading component took longer than expected",
4241
"async_component_failed": "Failed to load Component",
4342
"account_not_found": "Account not found",
4443
"account_empty_title": "No account ID was supplied",
@@ -275,7 +274,7 @@
275274
"number_of_affected_node": "It affected {{count}} nodes in the ledger:",
276275
"nodes_type": "{{action}} nodes",
277276
"node_meta_type": "It {{action}} a <Link>node</Link> with type",
278-
"transaction_balance_line_one": "It <1><0>{{action}}</0></1> a <3><0>{{currency}}</0></3> RippleState <5><0>{{node}}</0></5> between <7><0>{{account}}</0></7> and <9><0>{{counterAccount}}</0></9>",
277+
"transaction_balance_line_one": "It {{action}} a <Currency/> RippleState <Link>node</Link> between <Account/> and <CounterAccount/>",
279278
"transaction_balance_line_two": "Balance changed by <1><0>{{change}}</0></1> from <3><0>{{previousBalance}}</0></3> to <5><0>{{finalBalance}}</0></5>",
280279
"transaction_outstanding_balance_line_two": "Outstanding balance changed by <1><0>{{change}}</0></1> from <3><0>{{previousBalance}}</0></3> to <5><0>{{finalBalance}}</0></5>",
281280
"transaction_owned_directory": "It {{action}} a DirectoryNode <Link>node</Link> owned by",
@@ -287,13 +286,13 @@
287286
"account_balance_increased": "Balance increased by <1><0>{{difference}}</0><1><0>{{currency}}</0></1></1> from <3><0>{{previous}}</0><1><0>{{currency}}</0></1></3> to <5><0>{{final}}</0><1><0>{{currency}}</0></1></5>",
288287
"account_balance_decreased": "Balance decreased by <1><0>{{difference}}</0><1><0>{{currency}}</0></1></1> from <3><0>{{previous}}</0><1><0>{{currency}}</0></1></3> to <5><0>{{final}}</0><1><0>{{currency}}</0></1></5>",
289288
"decreased_from_to": "decreased by <1><0>{{change}}</0></1> from <3><0>{{previous}}</0></3> to <5><0>{{final}}</0></5>",
290-
"offer_node_meta": "It <1><0>{{action}}</0></1> a <3><0>{{pair}}</0></3> offer <5><0>{{node}}</0></5> owned by <7><0>{{account}}</0></7> with sequence # <9><0>{{sequence}}</0></9>",
289+
"offer_node_meta": "It {{action}} a <Currency/> / <Currency2/> offer <Link>node</Link> owned by <Account/> with sequence # {{sequence}}",
291290
"offer_replaces": "This offer replaces the existing offer #",
292-
"offer_partially_filled": "The offer was partially filled",
293-
"offer_filled": "The offer was filled",
294-
"offer_cancelled": "The offer was cancelled",
291+
"offer_partially_filled": "The offer was partially filled.",
292+
"offer_filled": "The offer was filled.",
293+
"offer_cancelled": "The offer was cancelled.",
295294
"offer_replaced": "This offer was replaced by the new offer #",
296-
"offer_lack_of_funds": "The offer was partially filled, then cancelled due to lack of funds",
295+
"offer_lack_of_funds": "The offer was partially filled, then cancelled due to lack of funds.",
297296
"transaction_sequence": "The transaction's sequence number is",
298297
"trust_set_description": "It establishes <1><0>{{amount}}</0></1> as the maximum amount of <3><0>{{currency}}</0></3> from <5><0>{{issuer}}</0></5> that <7><0>{{account}}</0></7> is willing to hold",
299298
"payment_desc_line_1": "The payment is from <source/> to <destination/>",

public/locales/es-ES/translations.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"30D": "30D",
3838
"total_transactions": "# de Txs",
3939
"total_fees": "Comisiones Totales",
40-
"async_component_timedout": "Cargar el componente tomó más tiempo del esperado",
4140
"async_component_failed": "Fallo al cargar Componente",
4241
"account_not_found": "Cuenta no encontrada",
4342
"account_empty_title": "El ID de la cuenta no fue facilitado",

public/locales/fr-FR/translations.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"30D": "30J",
3838
"total_transactions": "# de Txns",
3939
"total_fees": "Frais Totaux",
40-
"async_component_timedout": "Le chargement du composant a pris plus de temps que prévu",
4140
"async_component_failed": "Impossible de charger le composant",
4241
"account_not_found": "Compte non trouvé",
4342
"account_empty_title": "Aucun id de compte n'a été fourni",

public/locales/ja-JP/translations.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"30D": "30日",
3838
"total_transactions": "トランザクション数",
3939
"total_fees": "合計トランザクション手数料",
40-
"async_component_timedout": "コンポーネントの読み込みに通常以上の時間がかかりました",
4140
"async_component_failed": "コンポーネントの読み込みに失敗しました",
4241
"account_not_found": "アカウントが見つかりません",
4342
"account_empty_title": "アカウントIDが入力されていません",

public/locales/ko-KR/translations.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"30D": "30일",
3939
"total_transactions": "트랜잭션 수",
4040
"total_fees": "총 수수료",
41-
"async_component_timedout": "컴포넌트 로딩이 예상보다 오래 걸렸습니다",
4241
"async_component_failed": "컴포넌트 로드 실패",
4342
"account_not_found": "계정을 찾을 수 없습니다",
4443
"account_empty_title": "계정 ID가 제공되지 않았습니다",

public/locales/my-MM/translations.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"30D": "၃၀ရက်",
3939
"total_transactions": "ငွေလွှဲမှု အရေအတွက်",
4040
"total_fees": "စုစုပေါင်း အခကြေးငွေ",
41-
"async_component_timedout": "ကော်မပိုနင့် ဖွင့်ရန် မျှော်လင့်ထားသည်ထက် ပိုကြာနေပါသည်",
4241
"async_component_failed": "ကော်မပိုနင့် ဖွင့်၍မရပါ",
4342
"account_not_found": "အကောင့် မတွေ့ရှိပါ",
4443
"account_empty_title": "အကောင့် ID ထည့်သွင်းထားခြင်း မရှိပါ",

src/containers/Transactions/DetailTab/Meta/Offer.tsx

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { localizeNumber } from '../../../shared/utils'
99
import { Account } from '../../../shared/components/Account'
1010
import { ENTRY_ROUTE } from '../../../App/routes'
1111
import { RouteLink } from '../../../shared/routing'
12+
import Currency from '../../../shared/components/Currency'
1213
import type { MetaRenderFunctionWithTx, MetaNode } from './types'
1314

1415
const normalize = (value: number | string, currency: string): string =>
@@ -32,21 +33,18 @@ const renderChanges = (
3233
const changePays = normalize(prevPays - finalPays, paysCurrency)
3334
const changeGets = normalize(prevGets - finalGets, getsCurrency)
3435

35-
const renderIssuer = (issuer) =>
36-
issuer ? (
37-
<>
38-
.
39-
<Account account={issuer} />
40-
</>
41-
) : null
42-
4336
if (prevPays && finalPays) {
4437
const options = { ...CURRENCY_OPTIONS, currency: paysCurrency }
4538
meta.push(
4639
<li key={`taker_pays_decreased_${index}`} className="meta-line">
4740
<span className="field">TakerPays </span>
48-
<b>{paysCurrency}</b>
49-
{renderIssuer(final.TakerPays.issuer)}{' '}
41+
<b>
42+
<Currency
43+
currency={paysCurrency}
44+
issuer={final.TakerPays.issuer}
45+
displaySymbol={false}
46+
/>
47+
</b>{' '}
5048
<Trans i18nKey="decreased_from_to">
5149
decreased by
5250
<b>{{ change: localizeNumber(changePays, language, options) }}</b>
@@ -79,8 +77,13 @@ const renderChanges = (
7977
meta.push(
8078
<li key={`taker_gets_decreased_${index}`} className="meta-line">
8179
<span className="field">TakerGets </span>
82-
<b>{getsCurrency}</b>
83-
{renderIssuer(final.TakerGets.issuer)}{' '}
80+
<b>
81+
<Currency
82+
currency={getsCurrency}
83+
issuer={final.TakerGets.issuer}
84+
displaySymbol={false}
85+
/>
86+
</b>{' '}
8487
<Trans i18nKey="decreased_from_to">
8588
decreased by
8689
<b>{{ change: localizeNumber(changeGets, language, options) }}</b>
@@ -130,9 +133,6 @@ const render: MetaRenderFunctionWithTx = (
130133
)
131134
const invert =
132135
CURRENCY_ORDER.indexOf(getsCurrency) > CURRENCY_ORDER.indexOf(paysCurrency)
133-
const pair = invert
134-
? `${getsCurrency}/${paysCurrency}`
135-
: `${paysCurrency}/${getsCurrency}`
136136

137137
if (
138138
action === 'created' &&
@@ -190,15 +190,34 @@ const render: MetaRenderFunctionWithTx = (
190190

191191
return (
192192
<li key={`offer_node_meta_${index}`} className="meta-line">
193-
<Trans i18nKey="offer_node_meta">
194-
It {action} a <b>{pair}</b> offer
195-
<RouteLink to={ENTRY_ROUTE} params={{ id: node.LedgerIndex }}>
196-
node
197-
</RouteLink>
198-
owned by
199-
<Account account={fields.Account} />
200-
with sequence # <b>{{ sequence: fields.Sequence }}</b>
201-
</Trans>
193+
<Trans
194+
i18nKey="offer_node_meta"
195+
values={{ action, sequence: fields.Sequence }}
196+
components={{
197+
Currency: (
198+
<Currency
199+
currency={(invert ? getsCurrency : paysCurrency) || 'XRP'}
200+
issuer={invert ? tx.TakerGets?.issuer : tx.TakerPays?.issuer}
201+
displaySymbol={false}
202+
shortenIssuer
203+
/>
204+
),
205+
Currency2: (
206+
<Currency
207+
currency={(invert ? paysCurrency : getsCurrency) || 'XRP'}
208+
issuer={invert ? tx.TakerPays?.issuer : tx.TakerGets?.issuer}
209+
displaySymbol={false}
210+
shortenIssuer
211+
/>
212+
),
213+
Account: <Account account={fields.Account} />,
214+
Link: (
215+
<RouteLink to={ENTRY_ROUTE} params={{ id: node.LedgerIndex }}>
216+
{/* Content from i18n */}
217+
</RouteLink>
218+
),
219+
}}
220+
/>
202221
<ul>{lines}</ul>
203222
</li>
204223
)

src/containers/Transactions/DetailTab/Meta/RippleState.tsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
} from '../../../shared/utils'
77
import { RouteLink } from '../../../shared/routing'
88
import { ENTRY_ROUTE } from '../../../App/routes'
9+
import Currency from '../../../shared/components/Currency'
910
import type { MetaRenderFunction } from './types'
1011

1112
const render: MetaRenderFunction = (_t, language, action, node, index) => {
@@ -20,17 +21,20 @@ const render: MetaRenderFunction = (_t, language, action, node, index) => {
2021
} = computeRippleStateBalanceChange(node)
2122

2223
const line1 = (
23-
<Trans i18nKey="transaction_balance_line_one">
24-
It {action} a <b>{currency}</b>
25-
ripplestate
26-
<RouteLink to={ENTRY_ROUTE} params={{ id: node.LedgerIndex }}>
27-
node
28-
</RouteLink>
29-
between
30-
<Account account={account} />
31-
and
32-
<Account account={counterAccount} />
33-
</Trans>
24+
<Trans
25+
i18nKey="transaction_balance_line_one"
26+
values={{ action }}
27+
components={{
28+
Currency: <Currency currency={currency} />,
29+
Link: (
30+
<RouteLink to={ENTRY_ROUTE} params={{ id: node.LedgerIndex }}>
31+
{/* Content from i18n */}
32+
</RouteLink>
33+
),
34+
Account: <Account account={account} />,
35+
CounterAccount: <Account account={counterAccount} />,
36+
}}
37+
/>
3438
)
3539

3640
const line2 = change ? (

0 commit comments

Comments
 (0)