From a3aa7d95d09c83794067c47df4a455c0e3f21806 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 7 Apr 2023 17:30:01 -0300
Subject: anon withdrawal confirmation, and fix error with infinity loop

---
 packages/demobank-ui/src/pages/QrCodeSection.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'packages/demobank-ui/src/pages/QrCodeSection.tsx')

diff --git a/packages/demobank-ui/src/pages/QrCodeSection.tsx b/packages/demobank-ui/src/pages/QrCodeSection.tsx
index 8f85fff91..8613bfca7 100644
--- a/packages/demobank-ui/src/pages/QrCodeSection.tsx
+++ b/packages/demobank-ui/src/pages/QrCodeSection.tsx
@@ -14,16 +14,17 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
+import { stringifyWithdrawUri, WithdrawUriResult } from "@gnu-taler/taler-util";
 import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
 import { h, VNode } from "preact";
 import { useEffect } from "preact/hooks";
 import { QR } from "../components/QR.js";
 
 export function QrCodeSection({
-  talerWithdrawUri,
+  withdrawUri,
   onAborted,
 }: {
-  talerWithdrawUri: string;
+  withdrawUri: WithdrawUriResult;
   onAborted: () => void;
 }): VNode {
   const { i18n } = useTranslationContext();
@@ -33,8 +34,9 @@ export function QrCodeSection({
     //this hack manually triggers the tab update after the QR is in the DOM.
     // WebExtension will be using
     // https://developer.chrome.com/docs/extensions/reference/tabs/#event-onUpdated
-    document.title = `${document.title} ${talerWithdrawUri}`;
+    document.title = `${document.title} ${withdrawUri.withdrawalOperationId}`;
   }, []);
+  const talerWithdrawUri = stringifyWithdrawUri(withdrawUri);
 
   return (
     <section id="main" class="content">
-- 
cgit v1.2.3

