gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant-backoffice] branch master updated: bank: show QR code to


From: gnunet
Subject: [taler-merchant-backoffice] branch master updated: bank: show QR code to withdraw
Date: Mon, 20 Dec 2021 18:39:27 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository merchant-backoffice.

The following commit(s) were added to refs/heads/master by this push:
     new fb2b4ff  bank: show QR code to withdraw
fb2b4ff is described below

commit fb2b4ffc64603941706b35f58562bbfdf4314b58
Author: ms <ms@taler.net>
AuthorDate: Mon Dec 20 18:39:17 2021 +0100

    bank: show QR code to withdraw
---
 packages/bank/src/pages/home/index.tsx | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/packages/bank/src/pages/home/index.tsx 
b/packages/bank/src/pages/home/index.tsx
index fc52f58..1f9461c 100644
--- a/packages/bank/src/pages/home/index.tsx
+++ b/packages/bank/src/pages/home/index.tsx
@@ -3,6 +3,7 @@ import { h, Fragment, ComponentChildren, VNode } from "preact";
 import { useState, useEffect, StateUpdater } from "preact/hooks";
 import { Buffer } from "buffer";
 import { useTranslator } from "../../i18n";
+import { QR } from "../../components/QR";
 
 /**********************************************
  * Type definitions for states and API calls. *
@@ -493,7 +494,9 @@ function Account(props: any) {
    */
   if (talerWithdrawUri) {
     return (<div>
-      <p>Give this address to the Taler wallet: {talerWithdrawUri}</p>
+      <p>Scan the following QR code, and then confirm!</p>
+      <div>{QR({text: talerWithdrawUri})}</div>
+      <p>Content: <pre>{talerWithdrawUri}</pre></p>
       {props.children}
     </div>);
   }
@@ -565,7 +568,13 @@ export function BankHome(): VNode {
          accountLabel={backendState.username}>
 
          <button onClick={() => {
-            pageStateSetter({...pageState, isLoggedIn: false})
+            pageStateSetter((prevState) => {
+              const {
+               talerWithdrawUri,
+               withdrawalOutcome,
+               withdrawalId, ...rest } = prevState;
+               return {...rest, isLoggedIn: false, withdrawalInProgress: 
false};
+           })
          }}>Sign out</button>
 
           {!pageState.withdrawalInProgress && <button onClick={() => {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]