aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-08-09 10:42:56 -0300
committerSebastian <sebasjm@gmail.com>2021-08-09 10:43:02 -0300
commitabbf899b97ed09f215455be3cab8501b5da92860 (patch)
treeece2f1e669303f298159686696f9bf41a16e7545 /packages/taler-wallet-webextension
parent2ec3f4a5d5107a49f000ecb4245996bdfaf0a212 (diff)
add ex handling on wallet init
Diffstat (limited to 'packages/taler-wallet-webextension')
-rw-r--r--packages/taler-wallet-webextension/src/wxBackend.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts
index 8bbfc0c1d..e1517c4cf 100644
--- a/packages/taler-wallet-webextension/src/wxBackend.ts
+++ b/packages/taler-wallet-webextension/src/wxBackend.ts
@@ -261,7 +261,13 @@ async function reinitWallet(): Promise<void> {
http,
new BrowserCryptoWorkerFactory(),
);
- await wallet.handleCoreApiRequest("initWallet", "native-init", {});
+ try {
+ await wallet.handleCoreApiRequest("initWallet", "native-init", {});
+ } catch (e) {
+ console.error("could not initialize wallet", e);
+ walletInit.reject(e);
+ return;
+ }
wallet.addNotificationListener((x) => {
for (const x of notificationPorts) {
try {