aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx46
1 files changed, 9 insertions, 37 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx
index 54e8123e4..b0173b5d3 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx
@@ -24,7 +24,7 @@ import {
parsePaytoUri,
stringifyPaytoUri,
} from "@gnu-taler/taler-util";
-import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
+import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { format } from "date-fns";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
@@ -38,6 +38,7 @@ import { SimpleModal } from "../../../../components/modal/index.js";
import { MerchantBackend } from "../../../../declaration.js";
import { useTipDetails } from "../../../../hooks/reserves.js";
import { TipInfo } from "./TipInfo.js";
+import { ShowAccountsOfReserveAsQRWithLink } from "../create/CreatedSuccessfully.js";
type Entity = MerchantBackend.Tips.ReserveDetail;
type CT = MerchantBackend.ContractTerms;
@@ -53,13 +54,6 @@ export function DetailPage({ id, selected, onBack }: Props): VNode {
const didExchangeAckTransfer = Amounts.isNonZero(
Amounts.parseOrThrow(selected.exchange_initial_amount),
);
- const p = parsePaytoUri(selected.payto_uri);
- if (p) {
- p.params["message"] = id;
- p.params["amount"] = selected.merchant_initial_amount;
- }
-
- const link = !p ? selected.payto_uri : stringifyPaytoUri(p);
return (
<div class="columns">
@@ -111,11 +105,6 @@ export function DetailPage({ id, selected, onBack }: Props): VNode {
/>
</Fragment>
)}
- <Input<Entity>
- name="payto_uri"
- label={i18n.str`Account address`}
- readonly
- />
<Input name="id" label={i18n.str`Subject`} readonly />
</FormProvider>
@@ -143,30 +132,13 @@ export function DetailPage({ id, selected, onBack }: Props): VNode {
</div>
</div>
</Fragment>
- ) : (
- <Fragment>
- <p class="is-size-5">
- <i18n.Translate>
- To complete the setup of the reserve, you must now initiate a
- wire transfer using the given wire transfer subject and
- crediting the specified amount to the indicated account of the
- exchange.
- </i18n.Translate>
- </p>
- <p class="is-size-5">
- <i18n.Translate>
- If your system supports RFC 8905, you can do this by opening
- this URI:
- </i18n.Translate>
- </p>
- <pre>
- <a target="_blank" rel="noreferrer" href={link}>
- {link}
- </a>
- </pre>
- <QR text={link} />
- </Fragment>
- )}
+ ) : selected.accounts ? (
+ <ShowAccountsOfReserveAsQRWithLink
+ accounts={selected.accounts}
+ amount={selected.merchant_initial_amount}
+ message={id}
+ />
+ ) : undefined}
<div class="buttons is-right mt-5">
<button class="button" onClick={onBack}>