commit 3d4cd6ba614aeda538ee5273d7ddc16a9c4b9e79
parent bf8cb1f4270acb51ea9cb8a45b16b0eb01d235b8
Author: Sebastian <sebasjm@gmail.com>
Date: Mon, 13 Oct 2025 16:01:31 -0300
fix #10486
Diffstat:
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/packages/merchant-backoffice-ui/src/components/SolveMFA.tsx b/packages/merchant-backoffice-ui/src/components/SolveMFA.tsx
@@ -244,7 +244,7 @@ export function SolveMFAChallenges({
const { state: session, lib, logIn } = useSessionContext();
const [notif, setNotif] = useState<Notification | undefined>(undefined);
const [solved, setSolved] = useState<string[]>([]);
- // FIXME: we should save here also the expiration of the
+ // FIXME: we should save here also the expiration of the
// tan channel to be used when the user press "i have the code"
const [retransmission, setRetransmission] = useState<
Record<TanChannel, AbsoluteTime>
@@ -267,7 +267,17 @@ export function SolveMFAChallenges({
expiration={selected.expiration}
onSolved={() => {
setSelected(undefined);
- setSolved([...solved, selected.ch.challenge_id]);
+ const newSolved = [...solved, selected.ch.challenge_id];
+
+ const done = currentChallenge.combi_and
+ ? newSolved.length === currentChallenge.challenges.length
+ : newSolved.length > 0;
+
+ if (done) {
+ onCompleted(newSolved);
+ } else {
+ setSolved(newSolved);
+ }
}}
/>
);
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx
@@ -22,10 +22,10 @@
import {
HttpStatusCode,
TalerError,
- TalerErrorCode,
TalerMerchantApi,
- assertUnreachable,
+ assertUnreachable
} from "@gnu-taler/taler-util";
+import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
import { useState } from "preact/hooks";
import { ErrorLoadingMerchant } from "../../../../components/ErrorLoadingMerchant.js";
@@ -38,7 +38,6 @@ import { Notification } from "../../../../utils/types.js";
import { LoginPage } from "../../../login/index.js";
import { NotFoundPageOrAdminCreate } from "../../../notfound/index.js";
import { CreatePage } from "./CreatePage.js";
-import { useTranslationContext } from "@gnu-taler/web-util/browser";
export type Entity = {
request: TalerMerchantApi.PostOrderRequest;