diff --git a/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx b/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx
index d4c95d830..5169fc00f 100644
--- a/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx
+++ b/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx
@@ -14,7 +14,7 @@
GNU Taler; see the file COPYING. If not, see
*/
-import { Logger } from "@gnu-taler/taler-util";
+import { Logger, parseWithdrawUri } from "@gnu-taler/taler-util";
import {
HttpResponsePaginated,
useTranslationContext,
@@ -59,25 +59,29 @@ export function WithdrawalQRCode({
logger.trace("withdrawal status", data);
if (data.aborted) {
- //signal that this withdrawal is aborted
- //will redirect to account info
+ // signal that this withdrawal is aborted
+ // will redirect to account info
onAbort();
return ;
}
+ const parsedUri = parseWithdrawUri(talerWithdrawUri);
+ if (!parsedUri) {
+ throw Error("can't parse withdrawal URI");
+ }
+
if (!data.selection_done) {
return (
);
}
- /**
- * Wallet POSTed the withdrawal details! Ask the
- * user to authorize the operation (here CAPTCHA).
- */
+
+ // Wallet POSTed the withdrawal details! Ask the
+ // user to authorize the operation (here CAPTCHA).
return (
);
}