{((): VNode => {
switch (challenge.operation) {
case "delete-account":
return (
-
Account
-
{challenge.request}
);
case "create-transaction": {
const payto = parsePaytoUri(challenge.request.payto_uri)!;
return (
{challenge.request.amount && (
-
Amount
-
)}
{payto.isKnown && payto.targetType === "iban" && (
-
To account
-
{payto.iban}
)}
);
}
case "confirm-withdrawal":
return ;
case "create-cashout": {
return ;
}
case "update-account": {
return (
{challenge.request.cashout_payto_uri !== undefined && (
-
Cashout account
-
{challenge.request.cashout_payto_uri}
)}
{challenge.request.contact_data?.email !== undefined && (
-
Email
-
{challenge.request.contact_data?.email}
)}
{challenge.request.contact_data?.phone !== undefined && (
-
Phone
-
{challenge.request.contact_data?.phone}
)}
{challenge.request.debit_threshold !== undefined && (
-
Debit threshold
-
)}
{challenge.request.is_public !== undefined && (
-
Is this account public?
-
{challenge.request.is_public
? i18n.str`Enable`
: i18n.str`Disable`}
)}
{challenge.request.name !== undefined && (
-
Name
-
{challenge.request.name}
)}
{challenge.request.tan_channel !== undefined && (
-
Authentication channel
-
{challenge.request.tan_channel ?? i18n.str`Remove`}
)}
);
}
case "update-password": {
return (
-
New password
-
{challenge.request.new_password}
);
}
default:
assertUnreachable(challenge);
}
})()}
{challenge.info && (
Challenge details
)}
{challenge.sent.t_ms !== "never" && (
-
Sent at
-
{format(challenge.sent.t_ms, "dd/MM/yyyy HH:mm:ss", {
locale: dateLocale,
})}
)}
{challenge.info && (
-
{((ch: TalerCorebankApi.TanChannel): VNode => {
switch (ch) {
case TalerCorebankApi.TanChannel.SMS:
return To phone;
case TalerCorebankApi.TanChannel.EMAIL:
return To email;
default:
assertUnreachable(ch);
}
})(challenge.info.tan_channel)}
-
{challenge.info.tan_info}
)}