Skip to content

Commit 3cbc982

Browse files
authored
Support for Permissioned DEX XLS-81d (#1208)
This PR implements support for the [Permissioned DEX (XLS-81D)](https://github.com/XRPLF/XRPL-Standards/blob/56ba122be9f127c940fd37d433faaa2de91a4eb6/XLS-0081d-permissioned-dex/README.md). The rippled C++ PR can be [found here](https://github.com/XRPLF/rippled/pull/5404/files). This is [the relevant PR](XRPLF/xrpl.js#3032) for xrpl.js client library.
1 parent 739b979 commit 3cbc982

27 files changed

+321
-4
lines changed

public/locales/ca-CA/translations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@
282282
"offer_create_desc_line_1": "El compte <1><0>{{account}}</0></1> ha ofert pagar <3><0>{{takerGets}}</0><1><0>{{currency}}</0></1></3> per rebre <5><0>{{takerPays}}</0><1><0>{{currency}}</0></1></5>",
283283
"offer_create_desc_line_2": "El tipus de canvi per aquesta oferta és",
284284
"offer_create_desc_line_3": "La transacció també cancel·larà del compte l'oferta existent #",
285+
"offer_create_desc_line_5": "Aquesta oferta és aplicable al domini permès",
285286
"offer_will_expire_desc": "L'oferta expira el <1><0>{{date}}</0></1> llevat que es cancel·li o es consumeixi abans del",
286287
"offer_did_expire_desc": "L'oferta va expirar el <1><0>{{date}}</0></1> llevat que es cancel·lés o es consumís abans d'aquell moment",
287288
"escrow_is_from": "L'escrow és de <1><0>{{account}}</0></1> a <3><0>{{destination}}</0></3>",
@@ -574,6 +575,7 @@
574575
"gas": null,
575576
"delegate": null,
576577
"permissions": null,
578+
"pertaining_to_the_Permissioned_Domain": null,
577579
"tx_delegated_to": null,
578580
"account_delegates_to": null,
579581
"delegate_to": null,

public/locales/en-US/translations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@
291291
"offer_create_desc_line_1": "The account <1><0>{{account}}</0></1> offered to pay <3><0>{{takerGets}}</0><1><0>{{currency}}</0></1></3> in order to receive <5><0>{{takerPays}}</0><1><0>{{currency}}</0></1></5>",
292292
"offer_create_desc_line_2": "The exchange rate for this offer is",
293293
"offer_create_desc_line_3": "The transaction will also cancel the account's existing offer #",
294+
"offer_create_desc_line_5": "This Offer is applicable to the Permissioned Domain",
294295
"offer_will_expire_desc": "The offer expires on <1><0>{{date}}</0></1> unless canceled or consumed before then",
295296
"offer_did_expire_desc": "The offer expired on <1><0>{{date}}</0></1> unless cancelled or consumed before then",
296297
"escrow_is_from": "The escrow is from <1><0>{{account}}</0></1> to <3><0>{{destination}}</0></3>",
@@ -581,6 +582,7 @@
581582
"gas": "Gas",
582583
"delegate": "Delegate",
583584
"permissions": "Permissions",
585+
"pertaining_to_the_Permissioned_Domain": "pertaining to the Permissioned Domain",
584586
"tx_delegated_to": "The transaction is delegated to <Account/>",
585587
"account_delegates_to": "<Account/> delegates <Permissions/> permissions to <Authorize/>",
586588
"delegate_to": "<DelegateLabel/> <Permissions/> permissions to <Account/>",

public/locales/es-ES/translations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@
278278
"offer_create_desc_line_1": "La cuenta <1><0>{{account}}</0></1> se ofrece a pagar <3><0>{{takerGets}}</0><1><0>{{currency}}</0></1></3> a cambio de recibir <5><0>{{takerPays}}</0><1><0>{{currency}}</0></1></5>",
279279
"offer_create_desc_line_2": "El tipo de cambio de esta oferta es",
280280
"offer_create_desc_line_3": "La transacción cancelará también la oferta existente de la cuenta #",
281+
"offer_create_desc_line_5": "Esta oferta es aplicable al dominio permiso",
281282
"offer_will_expire_desc": "La oferta expirará el <1><0>{{date}}</0></1> a no ser que se cancele o se consuma antes",
282283
"offer_did_expire_desc": "La oferta expiró el <1><0>{{date}}</0></1> a no ser que se cancelase o se consumiese antes",
283284
"escrow_is_from": "El depósito es desde <1><0>{{account}}</0></1> a <3><0>{{destination}}</0></3>",
@@ -577,6 +578,7 @@
577578
"gas": null,
578579
"delegate": null,
579580
"permissions": null,
581+
"pertaining_to_the_Permissioned_Domain": null,
580582
"tx_delegated_to": null,
581583
"inner_transaction": null,
582584
"batch_table_detail_count": null,

public/locales/fr-FR/translations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@
280280
"offer_create_desc_line_1": "Le compte <1><0>{{account}}</0></1> offre de payer <3><0>{{takerGets}}</0><1><0>{{currency}}</0></1></3> pour recevoir <5><0>{{takerPays}}</0><1><0>{{currency}}</0></1></5>",
281281
"offer_create_desc_line_2": "Le taux de change pour cette offre est de ",
282282
"offer_create_desc_line_3": "La transaction annulera également l'offre existante du compte #",
283+
"offer_create_desc_line_5": "Cette offre est applicable au domaine permis",
283284
"offer_will_expire_desc": "L'offre expire le {{date}} sauf annulation ou consommation préalable.",
284285
"offer_did_expire_desc": "L'offre expire le <1><0>{{date}}</0></1> sauf annulation ou consommation préalable.",
285286
"escrow_is_from": "Le séquestre est de <1><0>{{account}}</0></1> à <3><0>{{destination}}</0></3>",
@@ -578,6 +579,7 @@
578579
"gas": null,
579580
"delegate": null,
580581
"permissions": null,
582+
"pertaining_to_the_Permissioned_Domain": null,
581583
"tx_delegated_to": null,
582584
"account_delegates_to": null,
583585
"delegate_to": null,

public/locales/ja-JP/translations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@
280280
"offer_create_desc_line_1": "<1><0>{{account}}</0></1> は、<5><0>{{takerPays}}</0><1><0>{{currency}}</0></1></5> を取得するために、<3><0>{{takerGets}}</0><1><0>{{currency}}</0></1></3> を支払うオファーを作成しました。",
281281
"offer_create_desc_line_2": "このオファーの変換レートは",
282282
"offer_create_desc_line_3": "トランザクションによって、アカウントの次のオファー番号も取り消されます :",
283+
"offer_create_desc_line_5": "このオファーは許可ドメインに適用されます",
283284
"offer_will_expire_desc": "オファーは、それまでに取り消されるか約定しない限り、<1><0>{{date}}</0></1> に失効します。",
284285
"offer_did_expire_desc": "オファーは <1><0>{{date}}</0></1> に失効しました。",
285286
"escrow_is_from": "エスクローは、<1><0>{{account}}</0></1> から <3><0>{{destination}}</0></3> に行われます。",
@@ -577,6 +578,7 @@
577578
"gas": null,
578579
"delegate": null,
579580
"permissions": null,
581+
"pertaining_to_the_Permissioned_Domain": null,
580582
"tx_delegated_to": null,
581583
"account_delegates_to": null,
582584
"delegate_to": null,

public/locales/ko-KR/translations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@
279279
"offer_create_desc_line_1": "<1><0>{{account}}</0></1> 계정은 <5><0>{{takerPays}}</0><1><0>{{currency}}</0></1></5>를 받기 위해 <3><0>{{takerGets}}</0><1><0>{{currency}}</0></1></3>를 지불하려 합니다",
280280
"offer_create_desc_line_2": "이 트랜잭션 제안의 환율은 다음과 같습니다",
281281
"offer_create_desc_line_3": "이 트랜잭션은 계정의 기존 트랜잭션 제안도 취소할 것입니다",
282+
"offer_create_desc_line_5": "이 트랜잭션 제안은 허가된 도메인에 적용됩니다",
282283
"offer_will_expire_desc": "트랜잭션 제안은 <1><0>{{date}}</0></1>에 만료되며, 그 전에 취소되거나 체결되지 않으면 만료됩니다",
283284
"offer_did_expire_desc": "트랜잭션 제안은 <1><0>{{date}}</0></1>에 만료되었습니다. 이는 그 전에 취소되거나 체결되지 않았기 때문입니다",
284285
"escrow_is_from": "에스크로는 <1><0>{{account}}</0></1>에서 <3><0>{{destination}}</0></3>로 이루어집니다",
@@ -575,6 +576,7 @@
575576
"gas": null,
576577
"delegate": null,
577578
"permissions": null,
579+
"pertaining_to_the_Permissioned_Domain": null,
578580
"tx_delegated_to": null,
579581
"account_delegates_to": null,
580582
"delegate_to": null,

public/locales/my-MM/translations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@
285285
"offer_create_desc_line_1": "အကောင့် <1><0>{{account}}</0></1> သည် <5><0>{{takerPays}}</0><1><0>{{currency}}</0></1></5> ရရှိရန်အတွက် <3><0>{{takerGets}}</0><1><0>{{currency}}</0></1></3> ပေးချေရန် ကမ်းလှမ်းသည်",
286286
"offer_create_desc_line_2": "ဤကမ်းလှမ်းမှုအတွက် လဲလှယ်နှုန်းမှာ",
287287
"offer_create_desc_line_3": "ဤငွေလွှဲမှုသည် အကောင့်၏ ရှိပြီးသား ကမ်းလှမ်းမှု # ကိုလည်း ပယ်ဖျက်မည်",
288+
"offer_create_desc_line_5": null,
288289
"offer_will_expire_desc": "ဤကမ်းလှမ်းမှုသည် <1><0>{{date}}</0></1> တွင် သက်တမ်းကုန်ဆုံးမည်၊ ထိုအချိန်မတိုင်မီ ပယ်ဖျက်ခြင်း သို့မဟုတ် အသုံးပြုခြင်း မရှိပါက",
289290
"offer_did_expire_desc": "ဤကမ်းလှမ်းမှုသည် <1><0>{{date}}</0></1> တွင် သက်တမ်းကုန်ဆုံးခဲ့သည်၊ ထိုအချိန်မတိုင်မီ ပယ်ဖျက်ခြင်း သို့မဟုတ် အသုံးပြုခြင်း မရှိခဲ့ပါက",
290291
"escrow_is_from": "Escrow သည် <1><0>{{account}}</0></1> မှ <3><0>{{destination}}</0></3> သို့ ဖြစ်သည်",
@@ -575,6 +576,7 @@
575576
"gas": null,
576577
"delegate": null,
577578
"permissions": null,
579+
"pertaining_to_the_Permissioned_Domain": null,
578580
"tx_delegated_to": null,
579581
"account_delegates_to": null,
580582
"delegate_to": null,

src/containers/Transactions/DetailTab/Meta/DirectoryNode.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ const render = (t, action, node, index) => {
1818
<Account account={fields.Owner} />
1919
</span>
2020
)}
21+
{fields.DomainID && (
22+
<span>
23+
{t('pertaining_to_the_Permissioned_Domain')}: {fields.DomainID}
24+
</span>
25+
)}
2126
</li>
2227
)
2328
}

src/containers/Transactions/test/Meta.test.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import OfferCreateWithMissingPreviousFields from '../../shared/components/Transa
88
import PaymentChannelClaim from '../../shared/components/Transaction/PaymentChannelClaim/test/mock_data/PaymentChannelClaim.json'
99
import DirectMPTPayment from './mock_data/DirectMPTPayment.json'
1010
import { TransactionMeta } from '../DetailTab/Meta'
11+
import OfferCreateWithPermissionedDomainID from '../../shared/components/Transaction/OfferCreate/test/mock_data/OfferCreateWithPermissionedDomainID.json'
1112

1213
describe('TransactionMeta container', () => {
1314
const createWrapper = (data: any = Transaction) =>
@@ -189,4 +190,11 @@ describe('TransactionMeta container', () => {
189190
'<li>Outstanding balance changed by<b>100</b>from<b>0</b>to<b>100</b></li>',
190191
)
191192
})
193+
194+
it(`renders OfferCreate Meta with a Permissioned Domain ID`, () => {
195+
const w = createWrapper(OfferCreateWithPermissionedDomainID)
196+
expect(w.html()).toContain(
197+
'Domain: 4A4879496CFF23CA32242D50DA04DDB41F4561167276A62AF21899F83DF28812',
198+
)
199+
})
192200
})

src/containers/shared/components/Transaction/OfferCreate/Description.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ const Description: TransactionDescriptionComponent = (
9090
</div>
9191
)}
9292
{data.tx.Expiration && renderLine4()}
93+
{data.tx.DomainID && (
94+
<div key="line5">
95+
{t('offer_create_desc_line_5')}
96+
<b>: {data.tx.DomainID}</b>
97+
</div>
98+
)}
9399
</>
94100
)
95101
}

0 commit comments

Comments
 (0)