commit 5c6a22ed1a555c2e1ed02c17e024a7f011dae856
parent c0e8d875e4ad3e2465d54a827f2ad54e535c1aaa
Author: Sebastian <sebasjm@taler-systems.com>
Date: Wed, 22 Jul 2026 16:30:04 -0300
dont clearUp when asking for confirmation, only when completed
Diffstat:
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/packages/taler-exchange-aml-webui/src/pages/decision/Summary.tsx b/packages/taler-exchange-aml-webui/src/pages/decision/Summary.tsx
@@ -19,6 +19,7 @@ import {
assertUnreachable,
HttpStatusCode,
opEmptySuccess,
+ opFixedSuccess,
Paytos,
TalerError,
TOPS_AmlEventsName,
@@ -172,13 +173,19 @@ export function Summary({
if (requiresConfirmation && !submitConfirmation) {
setSubmitConfirmation(true);
// FIXME: This is not the right type to use here.
- return opEmptySuccess(dummyHttpResponse);
+ return opFixedSuccess(dummyHttpResponse, false);
}
- return lib.exchange.makeAmlDesicion(session, req);
+ const r = await lib.exchange.makeAmlDesicion(session, req);
+ if (r.type === "fail") return r;
+ return opFixedSuccess(dummyHttpResponse, true);
},
!request ? undefined : [request],
);
- submit.onSuccess = clearUp;
+ submit.onSuccess = (completed) => {
+ if (completed) {
+ clearUp();
+ }
+ };
submit.onFail = showError(i18n.str`Failed to make the decision.`, (fail) => {
switch (fail.case) {