aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/pages/WithdrawalQRCode.tsx')
-rw-r--r--packages/demobank-ui/src/pages/WithdrawalQRCode.tsx22
1 files changed, 14 insertions, 8 deletions
diff --git a/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx b/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx
index c9384e945..787eeca52 100644
--- a/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx
+++ b/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx
@@ -68,7 +68,6 @@ export function WithdrawalQRCode({
const { body: data } = result;
if (data.status === "aborted") {
- // FIXME: remove exchange word
return <section id="main" class="content">
<h1 class="nav">{i18n.str`Operation aborted`}</h1>
<section>
@@ -143,19 +142,26 @@ export function WithdrawalQRCode({
);
}
- if (!data.selected_reserve_pub) {
+ const account = !data.selected_exchange_account ? undefined : parsePaytoUri(data.selected_exchange_account)
+
+ if (!data.selected_reserve_pub && account) {
return <Attention type="danger"
- title={i18n.str`The operation is incomplete or some step in the withdrawal failed`} >
- <i18n.Translate>The wallet confirmation is partially confirmed. The Taler Exchange operator is selected but no withdrawal identification found.</i18n.Translate>
+ title={i18n.str`The operation is marked as 'selected' but some step in the withdrawal failed`} >
+ <i18n.Translate>The account is selected but no withdrawal identification found.</i18n.Translate>
</Attention>
}
- const account = !data.selected_exchange_account ? undefined : parsePaytoUri(data.selected_exchange_account)
+ if (!account && data.selected_reserve_pub) {
+ return <Attention type="danger"
+ title={i18n.str`The operation is marked as 'selected' but some step in the withdrawal failed`}>
+ <i18n.Translate>There is a withdrawal identification but no account has been selected or the selected account is invalid.</i18n.Translate>
+ </Attention>
+ }
- if (!account) {
+ if (!account || !data.selected_reserve_pub) {
return <Attention type="danger"
- title={i18n.str`The operation is incomplete or some step in the withdrawal failed`}>
- <i18n.Translate>The Taler Exchange operator is selected but the Taler Exchange operator account is missing or invalid.</i18n.Translate>
+ title={i18n.str`The operation is marked as 'selected' but some step in the withdrawal failed`}>
+ <i18n.Translate>No withdrawal ID found and no account has been selected or the selected account is invalid.</i18n.Translate>
</Attention>
}