commit abbf899b97ed09f215455be3cab8501b5da92860
parent 2ec3f4a5d5107a49f000ecb4245996bdfaf0a212
Author: Sebastian <sebasjm@gmail.com>
Date: Mon, 9 Aug 2021 10:42:56 -0300
add ex handling on wallet init
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git 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 {