From 825d2c4352022e7397854b2bd9ba7d3589873c07 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 15 Feb 2023 23:32:42 +0100 Subject: make wallet-cli runnable under qtart --- packages/taler-wallet-core/src/operations/backup/index.ts | 4 ++-- packages/taler-wallet-core/src/operations/common.ts | 2 +- packages/taler-wallet-core/src/operations/deposits.ts | 6 +++--- packages/taler-wallet-core/src/operations/exchanges.ts | 9 ++------- packages/taler-wallet-core/src/operations/merchants.ts | 2 +- packages/taler-wallet-core/src/operations/pay-merchant.ts | 7 +++---- packages/taler-wallet-core/src/operations/pay-peer.ts | 5 ++--- packages/taler-wallet-core/src/operations/recoup.ts | 2 +- packages/taler-wallet-core/src/operations/refresh.ts | 4 ++-- packages/taler-wallet-core/src/operations/testing.ts | 2 +- packages/taler-wallet-core/src/operations/tip.ts | 4 ++-- packages/taler-wallet-core/src/operations/withdraw.ts | 4 ++-- 12 files changed, 22 insertions(+), 29 deletions(-) (limited to 'packages/taler-wallet-core/src/operations') diff --git a/packages/taler-wallet-core/src/operations/backup/index.ts b/packages/taler-wallet-core/src/operations/backup/index.ts index 7d3953ebb..3dae26087 100644 --- a/packages/taler-wallet-core/src/operations/backup/index.ts +++ b/packages/taler-wallet-core/src/operations/backup/index.ts @@ -85,13 +85,13 @@ import { ConfigRecordKey, WalletBackupConfState, } from "../../db.js"; -import { TalerError } from "../../errors.js"; +import { TalerError } from "@gnu-taler/taler-util"; import { InternalWalletState } from "../../internal-wallet-state.js"; import { assertUnreachable } from "../../util/assertUnreachable.js"; import { readSuccessResponseJsonOrThrow, readTalerErrorResponse, -} from "../../util/http.js"; +} from "@gnu-taler/taler-util/http"; import { checkDbInvariant, checkLogicInvariant, diff --git a/packages/taler-wallet-core/src/operations/common.ts b/packages/taler-wallet-core/src/operations/common.ts index 3ea02012b..e61a6fe95 100644 --- a/packages/taler-wallet-core/src/operations/common.ts +++ b/packages/taler-wallet-core/src/operations/common.ts @@ -42,7 +42,7 @@ import { ExchangeDetailsRecord, ExchangeRecord, } from "../db.js"; -import { makeErrorDetail, TalerError } from "../errors.js"; +import { makeErrorDetail, TalerError } from "@gnu-taler/taler-util"; import { InternalWalletState } from "../internal-wallet-state.js"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; import { GetReadWriteAccess } from "../util/query.js"; diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts index 4ff6a65cd..9d71f020f 100644 --- a/packages/taler-wallet-core/src/operations/deposits.ts +++ b/packages/taler-wallet-core/src/operations/deposits.ts @@ -62,10 +62,10 @@ import { OperationStatus, TransactionStatus, } from "../db.js"; -import { TalerError } from "../errors.js"; -import { checkWithdrawalKycStatus, KycPendingInfo, KycUserType } from "../index.js"; +import { TalerError } from "@gnu-taler/taler-util"; +import { KycPendingInfo, KycUserType } from "../index.js"; import { InternalWalletState } from "../internal-wallet-state.js"; -import { readSuccessResponseJsonOrThrow } from "../util/http.js"; +import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { OperationAttemptResult } from "../util/retries.js"; import { makeTransactionId, spendCoins } from "./common.js"; import { getExchangeDetails } from "./exchanges.js"; diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts index 67f77de77..2b6a881dd 100644 --- a/packages/taler-wallet-core/src/operations/exchanges.ts +++ b/packages/taler-wallet-core/src/operations/exchanges.ts @@ -41,6 +41,7 @@ import { NotificationType, parsePaytoUri, Recoup, + TalerError, TalerErrorCode, TalerProtocolDuration, TalerProtocolTimestamp, @@ -49,6 +50,7 @@ import { WireFeeMap, WireInfo, } from "@gnu-taler/taler-util"; +import { HttpRequestLibrary, readSuccessResponseTextOrThrow, readSuccessResponseJsonOrThrow, getExpiry } from "@gnu-taler/taler-util/http"; import { DenominationRecord, DenominationVerificationStatus, @@ -56,14 +58,7 @@ import { ExchangeRecord, WalletStoresV1, } from "../db.js"; -import { TalerError } from "../errors.js"; import { InternalWalletState, TrustInfo } from "../internal-wallet-state.js"; -import { - getExpiry, - HttpRequestLibrary, - readSuccessResponseJsonOrThrow, - readSuccessResponseTextOrThrow, -} from "../util/http.js"; import { checkDbInvariant } from "../util/invariants.js"; import { DbAccess, diff --git a/packages/taler-wallet-core/src/operations/merchants.ts b/packages/taler-wallet-core/src/operations/merchants.ts index eeefc0f79..c47ec4a0a 100644 --- a/packages/taler-wallet-core/src/operations/merchants.ts +++ b/packages/taler-wallet-core/src/operations/merchants.ts @@ -25,7 +25,7 @@ import { LibtoolVersion, } from "@gnu-taler/taler-util"; import { InternalWalletState, MerchantInfo } from "../internal-wallet-state.js"; -import { readSuccessResponseJsonOrThrow } from "../util/http.js"; +import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; const logger = new Logger("taler-wallet-core:merchants.ts"); diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts index 2a89c59ed..f84ac2567 100644 --- a/packages/taler-wallet-core/src/operations/pay-merchant.ts +++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts @@ -94,13 +94,12 @@ import { makePendingOperationFailedError, TalerError, TalerProtocolViolationError, -} from "../errors.js"; -import { GetReadWriteAccess } from "../index.browser.js"; +} from "@gnu-taler/taler-util"; +import { GetReadWriteAccess } from "../index.js"; import { EXCHANGE_COINS_LOCK, InternalWalletState, } from "../internal-wallet-state.js"; -import { PendingTaskType } from "../pending-types.js"; import { assertUnreachable } from "../util/assertUnreachable.js"; import { CoinSelectionTally, @@ -114,7 +113,7 @@ import { readTalerErrorResponse, readUnexpectedResponseDetails, throwUnexpectedRequestError, -} from "../util/http.js"; +} from "@gnu-taler/taler-util/http"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; import { OperationAttemptResult, diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts index 7dc7b67fe..022a824de 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer.ts @@ -81,16 +81,15 @@ import { WithdrawalGroupStatus, WithdrawalRecordType, } from "../db.js"; -import { TalerError } from "../errors.js"; +import { TalerError } from "@gnu-taler/taler-util"; import { InternalWalletState } from "../internal-wallet-state.js"; import { makeTransactionId, runOperationWithErrorReporting, spendCoins, } from "../operations/common.js"; -import { readSuccessResponseJsonOrThrow } from "../util/http.js"; +import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { checkDbInvariant } from "../util/invariants.js"; -import { GetReadOnlyAccess } from "../util/query.js"; import { OperationAttemptResult, OperationAttemptResultType, diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts index 00dd0e1c6..3b423474b 100644 --- a/packages/taler-wallet-core/src/operations/recoup.ts +++ b/packages/taler-wallet-core/src/operations/recoup.ts @@ -49,7 +49,7 @@ import { WithdrawCoinSource, } from "../db.js"; import { InternalWalletState } from "../internal-wallet-state.js"; -import { readSuccessResponseJsonOrThrow } from "../util/http.js"; +import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { checkDbInvariant } from "../util/invariants.js"; import { GetReadWriteAccess } from "../util/query.js"; import { diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index 5b7bf8d83..773689635 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -63,7 +63,7 @@ import { RefreshReasonDetails, WalletStoresV1, } from "../db.js"; -import { TalerError } from "../errors.js"; +import { TalerError } from "@gnu-taler/taler-util"; import { EXCHANGE_COINS_LOCK, InternalWalletState, @@ -72,7 +72,7 @@ import { assertUnreachable } from "../util/assertUnreachable.js"; import { readSuccessResponseJsonOrThrow, readUnexpectedResponseDetails, -} from "../util/http.js"; +} from "@gnu-taler/taler-util/http"; import { checkDbInvariant } from "../util/invariants.js"; import { GetReadWriteAccess } from "../util/query.js"; import { diff --git a/packages/taler-wallet-core/src/operations/testing.ts b/packages/taler-wallet-core/src/operations/testing.ts index 50454a920..873fac021 100644 --- a/packages/taler-wallet-core/src/operations/testing.ts +++ b/packages/taler-wallet-core/src/operations/testing.ts @@ -29,7 +29,7 @@ import { HttpRequestLibrary, readSuccessResponseJsonOrThrow, checkSuccessResponseOrThrow, -} from "../util/http.js"; +} from "@gnu-taler/taler-util/http"; import { AmountString, codecForAny, diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts index 2bf216102..ec7546992 100644 --- a/packages/taler-wallet-core/src/operations/tip.ts +++ b/packages/taler-wallet-core/src/operations/tip.ts @@ -45,12 +45,12 @@ import { DenominationRecord, TipRecord, } from "../db.js"; -import { makeErrorDetail } from "../errors.js"; +import { makeErrorDetail } from "@gnu-taler/taler-util"; import { InternalWalletState } from "../internal-wallet-state.js"; import { getHttpResponseErrorDetails, readSuccessResponseJsonOrThrow, -} from "../util/http.js"; +} from "@gnu-taler/taler-util/http"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; import { OperationAttemptResult, diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index bcc8600c7..f6d79b229 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -85,7 +85,7 @@ import { getErrorDetailFromException, makeErrorDetail, TalerError, -} from "../errors.js"; +} from "@gnu-taler/taler-util"; import { InternalWalletState } from "../internal-wallet-state.js"; import { makeCoinAvailable, @@ -99,7 +99,7 @@ import { readSuccessResponseJsonOrErrorCode, readSuccessResponseJsonOrThrow, throwUnexpectedRequestError, -} from "../util/http.js"; +} from "@gnu-taler/taler-util/http"; import { checkDbInvariant, checkLogicInvariant, -- cgit v1.2.3