merchant-backoffice

ZZZ: Inactive/Deprecated
Log | Files | Refs | Submodules | README

commit 321adee497a5df616d4d8a2c5070e2fdd9738ab3
parent 07df6b6b872aa088b42d716323a208d41243317a
Author: Sebastian <sebasjm@gmail.com>
Date:   Wed,  7 Sep 2022 10:43:44 -0300

trigger tab update after showing the QR

Diffstat:
Mpackages/bank/src/pages/home/index.tsx | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/packages/bank/src/pages/home/index.tsx b/packages/bank/src/pages/home/index.tsx @@ -1027,6 +1027,12 @@ 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) => ({