[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] branch master updated: wait the qr code in t
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] branch master updated: wait the qr code in the qr section to be in the dom |
Date: |
Wed, 07 Sep 2022 18:05:54 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant-backoffice.
The following commit(s) were added to refs/heads/master by this push:
new a3a7a7e wait the qr code in the qr section to be in the dom
a3a7a7e is described below
commit a3a7a7ef38ede66ac7e73bfeb855b13b84bd1b61
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Sep 7 13:04:40 2022 -0300
wait the qr code in the qr section to be in the dom
---
packages/bank/src/pages/home/index.tsx | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/packages/bank/src/pages/home/index.tsx
b/packages/bank/src/pages/home/index.tsx
index cc44b92..4914626 100644
--- a/packages/bank/src/pages/home/index.tsx
+++ b/packages/bank/src/pages/home/index.tsx
@@ -1071,12 +1071,7 @@ function TalerWithdrawalQRCode(Props: any): VNode {
// waiting for the wallet:
const { data, error, mutate } =
useSWR(`integration-api/withdrawal-operation/${withdrawalId}`);
- useEffect(() => {
- //Taler Wallet WebExtension is listening to headers response and tab
updates.
- //In the SPA there is no header response with the Taler URI so
- //this hack manually triggers the tab update after the QR is in the DOM.
- window.location.href = window.location.href.split("#")[0] + "#"
- },[])
+
if (typeof error !== "undefined") {
console.log(`withdrawal (${withdrawalId}) was never (correctly) created at
the bank...`, error);
pageStateSetter((prevState: PageStateType) => ({
@@ -1111,16 +1106,27 @@ function TalerWithdrawalQRCode(Props: any): VNode {
};
})
}
+
+ function QrCodeSection() {
+ useEffect(() => {
+ //Taler Wallet WebExtension is listening to headers response and tab
updates.
+ //In the SPA there is no header response with the Taler URI so
+ //this hack manually triggers the tab update after the QR is in the DOM.
+ window.location.href = window.location.href.split("#")[0] + "#"
+ },[])
+
+ return <section id="main" class="content">
+ <h1 class="nav">{i18n`Withdraw to a Taler Wallet`}</h1>
+ <p>{i18n`You can use this QR code to withdraw to your mobile wallet:`}</p>
+ {QR({text: talerWithdrawUri})}
+ <p>Click <a id="linkqr" href={talerWithdrawUri}>{i18n`this link`}</a> to
open your Taler wallet!</p>
+ <br />
+ {abortButton}
+ </section>
+ }
if (!data.selection_done) {
setTimeout(() => mutate(), 1000); // check again after 1 second.
- return (<section id="main" class="content">
- <h1 class="nav">{i18n`Withdraw to a Taler Wallet`}</h1>
- <p>{i18n`You can use this QR code to withdraw to your mobile
wallet:`}</p>
- {QR({text: talerWithdrawUri})}
- <p>Click <a href={talerWithdrawUri}>{i18n`this link`}</a> to open your
Taler wallet!</p>
- <br />
- {abortButton}
- </section>);
+ return (<QrCodeSection />);
}
/**
* Wallet POSTed the withdrawal details! Ask the
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant-backoffice] branch master updated: wait the qr code in the qr section to be in the dom,
gnunet <=