aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-08 23:26:02 +0100
committerFlorian Dold <florian@dold.me>2022-03-08 23:26:02 +0100
commit7a27da5fba288e39d744f0b70419b38e3f29aa87 (patch)
tree41974e4d0a2238460b90aa9c94fb9e7455746569 /packages/taler-wallet-webextension
parentced02d1fed4571302423d09e506623a703893d45 (diff)
webextension: close popup
only seems to work with callbacks, not with promises
Diffstat (limited to 'packages/taler-wallet-webextension')
-rw-r--r--packages/taler-wallet-webextension/src/popupEntryPoint.tsx11
1 files changed, 6 insertions, 5 deletions
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>