From 7a27da5fba288e39d744f0b70419b38e3f29aa87 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian@dold.me>
Date: Tue, 8 Mar 2022 23:26:02 +0100
Subject: webextension: close popup

only seems to work with callbacks, not with promises
---
 packages/taler-wallet-webextension/src/popupEntryPoint.tsx | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/popupEntryPoint.tsx')

diff --git a/packages/taler-wallet-webextension/src/popupEntryPoint.tsx b/packages/taler-wallet-webextension/src/popupEntryPoint.tsx
index 02ab0df2c..56d1e60e8 100644
--- a/packages/taler-wallet-webextension/src/popupEntryPoint.tsx
+++ b/packages/taler-wallet-webextension/src/popupEntryPoint.tsx
@@ -172,15 +172,16 @@ function Application(): VNode {
 function RedirectToWalletPage(): VNode {
   const page = document.location.hash || "#/";
   useEffect(() => {
-    chrome.tabs
-      .create({
+    chrome.tabs.create(
+      {
         active: true,
         // eslint-disable-next-line no-undef
         url: chrome.runtime.getURL(`/static/wallet.html${page}`),
-      })
-      .then(() => {
+      },
+      () => {
         window.close();
-      });
+      },
+    );
   });
   return (
     <span>
-- 
cgit v1.2.3

