aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-15 23:32:42 +0100
committerFlorian Dold <florian@dold.me>2023-02-16 02:50:29 +0100
commit825d2c4352022e7397854b2bd9ba7d3589873c07 (patch)
treed23530bf8408367439e6b3820ea0c4269bfeb39a /packages/taler-wallet-webextension
parentcb2f4c21d85707abb0221cbf2a859a98836b2d44 (diff)
make wallet-cli runnable under qtart
Diffstat (limited to 'packages/taler-wallet-webextension')
-rw-r--r--packages/taler-wallet-webextension/src/browserHttpLib.ts10
-rw-r--r--packages/taler-wallet-webextension/src/browserWorkerEntry.ts7
-rw-r--r--packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts2
-rw-r--r--packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts6
-rw-r--r--packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts6
-rw-r--r--packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts7
-rw-r--r--packages/taler-wallet-webextension/src/cta/Withdraw/state.ts3
-rw-r--r--packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts3
-rw-r--r--packages/taler-wallet-webextension/src/platform/chrome.ts3
-rw-r--r--packages/taler-wallet-webextension/src/serviceWorkerCryptoWorkerFactory.ts4
-rw-r--r--packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts4
-rw-r--r--packages/taler-wallet-webextension/src/wxApi.ts8
-rw-r--r--packages/taler-wallet-webextension/src/wxBackend.ts4
13 files changed, 28 insertions, 39 deletions
diff --git a/packages/taler-wallet-webextension/src/browserHttpLib.ts b/packages/taler-wallet-webextension/src/browserHttpLib.ts
index 165a0037c..3b8bb1881 100644
--- a/packages/taler-wallet-webextension/src/browserHttpLib.ts
+++ b/packages/taler-wallet-webextension/src/browserHttpLib.ts
@@ -18,19 +18,17 @@
* Imports.
*/
import {
+ Logger,
+ RequestThrottler,
+ TalerErrorCode,
HttpRequestLibrary,
HttpRequestOptions,
HttpResponse,
Headers,
TalerError,
-} from "@gnu-taler/taler-wallet-core";
-import {
- Logger,
- RequestThrottler,
- stringToBytes,
- TalerErrorCode,
} from "@gnu-taler/taler-util";
+
const logger = new Logger("browserHttpLib");
/**
diff --git a/packages/taler-wallet-webextension/src/browserWorkerEntry.ts b/packages/taler-wallet-webextension/src/browserWorkerEntry.ts
index 2f1a26e36..bb1794e56 100644
--- a/packages/taler-wallet-webextension/src/browserWorkerEntry.ts
+++ b/packages/taler-wallet-webextension/src/browserWorkerEntry.ts
@@ -22,11 +22,12 @@
* Imports.
*/
-import { j2s, Logger } from "@gnu-taler/taler-util";
import {
+ j2s,
+ Logger,
getErrorDetailFromException,
- nativeCrypto,
-} from "@gnu-taler/taler-wallet-core";
+} from "@gnu-taler/taler-util";
+import { nativeCrypto } from "@gnu-taler/taler-wallet-core";
const logger = new Logger("browserWorkerEntry.ts");
diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
index ee5375859..670a67599 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
@@ -16,7 +16,7 @@
/* eslint-disable react-hooks/rules-of-hooks */
import { Amounts, TalerProtocolTimestamp } from "@gnu-taler/taler-util";
-import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { isFuture, parse } from "date-fns";
import { useState } from "preact/hooks";
import { alertFromError, useAlertContext } from "../../context/alert.js";
diff --git a/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts b/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts
index 66c018ddf..8459d5ca2 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts
@@ -20,16 +20,14 @@ import {
NotificationType,
PreparePayResult,
PreparePayResultType,
- TalerErrorDetail,
TalerProtocolTimestamp,
} from "@gnu-taler/taler-util";
-import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { useEffect, useState } from "preact/hooks";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { useEffect } from "preact/hooks";
import { alertFromError, useAlertContext } from "../../context/alert.js";
import { useBackendContext } from "../../context/backend.js";
import { useTranslationContext } from "../../context/translation.js";
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
-import { withSafe } from "../../mui/handlers.js";
import { Props, State } from "./index.js";
export function useComponentState({
diff --git a/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts b/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts
index 6574d6ba1..b306ca122 100644
--- a/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts
@@ -15,11 +15,9 @@
*/
import {
- Amounts,
- TalerErrorDetail,
- TalerProtocolTimestamp,
+ Amounts, TalerProtocolTimestamp
} from "@gnu-taler/taler-util";
-import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { isFuture, parse } from "date-fns";
import { useState } from "preact/hooks";
import { alertFromError, useAlertContext } from "../../context/alert.js";
diff --git a/packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts b/packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts
index 12643b893..6b50faf10 100644
--- a/packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts
@@ -16,12 +16,9 @@
import {
AbsoluteTime,
- Amounts,
- TalerErrorDetail,
- TalerProtocolTimestamp,
+ Amounts, TalerProtocolTimestamp
} from "@gnu-taler/taler-util";
-import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { useState } from "preact/hooks";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { alertFromError, useAlertContext } from "../../context/alert.js";
import { useBackendContext } from "../../context/backend.js";
import { useTranslationContext } from "../../context/translation.js";
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts
index 5f149064c..9522c2bfb 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts
@@ -20,8 +20,9 @@ import {
Amounts,
ExchangeListItem,
ExchangeTosStatus,
+ TalerError,
} from "@gnu-taler/taler-util";
-import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { useState } from "preact/hooks";
import { alertFromError, useAlertContext } from "../../context/alert.js";
import { useBackendContext } from "../../context/backend.js";
diff --git a/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts b/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts
index cf9409bad..a5e357f7d 100644
--- a/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts
+++ b/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts
@@ -13,8 +13,7 @@
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { TalerErrorDetail } from "@gnu-taler/taler-util";
-import { TalerError } from "@gnu-taler/taler-wallet-core";
+import { TalerErrorDetail, TalerError } from "@gnu-taler/taler-util";
import { useEffect, useMemo, useState } from "preact/hooks";
import { BackgroundError } from "../wxApi.js";
diff --git a/packages/taler-wallet-webextension/src/platform/chrome.ts b/packages/taler-wallet-webextension/src/platform/chrome.ts
index 07829641e..beb65b2d0 100644
--- a/packages/taler-wallet-webextension/src/platform/chrome.ts
+++ b/packages/taler-wallet-webextension/src/platform/chrome.ts
@@ -19,8 +19,9 @@ import {
Logger,
TalerErrorCode,
TalerUriType,
+ TalerError,
} from "@gnu-taler/taler-util";
-import { TalerError, WalletOperations } from "@gnu-taler/taler-wallet-core";
+import { WalletOperations } from "@gnu-taler/taler-wallet-core";
import { BackgroundOperations } from "../wxApi.js";
import {
BackgroundPlatformAPI,
diff --git a/packages/taler-wallet-webextension/src/serviceWorkerCryptoWorkerFactory.ts b/packages/taler-wallet-webextension/src/serviceWorkerCryptoWorkerFactory.ts
index 0742d5ccd..4ee572435 100644
--- a/packages/taler-wallet-webextension/src/serviceWorkerCryptoWorkerFactory.ts
+++ b/packages/taler-wallet-webextension/src/serviceWorkerCryptoWorkerFactory.ts
@@ -22,12 +22,12 @@
import {
CryptoWorker,
CryptoWorkerFactory,
- SynchronousCryptoWorker,
+ SynchronousCryptoWorkerPlain,
} from "@gnu-taler/taler-wallet-core";
export class SynchronousCryptoWorkerFactory implements CryptoWorkerFactory {
startWorker(): CryptoWorker {
- return new SynchronousCryptoWorker();
+ return new SynchronousCryptoWorkerPlain();
}
getConcurrency(): number {
diff --git a/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts b/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
index 4b47e89d5..00c0085ef 100644
--- a/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
+++ b/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
@@ -21,14 +21,12 @@ import {
Logger,
RequestThrottler,
TalerErrorCode,
-} from "@gnu-taler/taler-util";
-import {
Headers,
HttpRequestLibrary,
HttpRequestOptions,
HttpResponse,
TalerError,
-} from "@gnu-taler/taler-wallet-core";
+} from "@gnu-taler/taler-util";
/**
* An implementation of the [[HttpRequestLibrary]] using the
diff --git a/packages/taler-wallet-webextension/src/wxApi.ts b/packages/taler-wallet-webextension/src/wxApi.ts
index c064d7111..5f3d09619 100644
--- a/packages/taler-wallet-webextension/src/wxApi.ts
+++ b/packages/taler-wallet-webextension/src/wxApi.ts
@@ -29,20 +29,18 @@ import {
NotificationType,
TalerErrorCode,
TalerErrorDetail,
- WalletDiagnostics,
+ WalletDiagnostics
} from "@gnu-taler/taler-util";
import {
- TalerError,
WalletCoreApiClient,
WalletCoreOpKeys,
WalletCoreRequestType,
- WalletCoreResponseType,
- WalletOperations,
+ WalletCoreResponseType
} from "@gnu-taler/taler-wallet-core";
import {
MessageFromBackend,
MessageFromFrontendBackground,
- MessageFromFrontendWallet,
+ MessageFromFrontendWallet
} from "./platform/api.js";
import { platform } from "./platform/foreground.js";
diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts
index 99602445d..cca07941a 100644
--- a/packages/taler-wallet-webextension/src/wxBackend.ts
+++ b/packages/taler-wallet-webextension/src/wxBackend.ts
@@ -32,14 +32,14 @@ import {
TalerErrorCode,
TalerUriType,
WalletDiagnostics,
+ makeErrorDetail,
+ getErrorDetailFromException,
} from "@gnu-taler/taler-util";
import {
DbAccess,
deleteTalerDatabase,
exportDb,
- getErrorDetailFromException,
importDb,
- makeErrorDetail,
OpenedPromise,
openPromise,
openTalerDatabase,