diff options
author | Florian Dold <florian@dold.me> | 2021-03-17 17:56:37 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-03-17 17:56:37 +0100 |
commit | 07cdfb2e4ec761021477271776b81f33af0e731d (patch) | |
tree | cb62b1d1a04e1e64b8ee47e78196e858727d2c0a /packages/taler-wallet-cli | |
parent | 42a4d666f42ce94274995bfdae644444ff5f6d53 (diff) |
towards wallet-core / util split
Diffstat (limited to 'packages/taler-wallet-cli')
31 files changed, 124 insertions, 163 deletions
diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json index 993723278..1c391e1de 100644 --- a/packages/taler-wallet-cli/package.json +++ b/packages/taler-wallet-cli/package.json @@ -44,6 +44,7 @@ "typescript": "^4.1.3" }, "dependencies": { + "@gnu-taler/taler-util": "workspace:*", "@gnu-taler/taler-wallet-core": "workspace:*", "@types/minimatch": "^3.0.3", "axios": "^0.21.1", diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index acf46526f..8865c3303 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -14,34 +14,16 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ +/** + * Imports. + */ import os from "os"; import fs from "fs"; -import { - getDefaultNodeWallet, - Logger, - Amounts, - Wallet, - OperationFailedAndReportedError, - OperationFailedError, - NodeHttpLib, - PreparePayResultType, - setDangerousTimetravel, - classifyTalerUri, - TalerUriType, - decodeCrock, - addPaytoQueryParams, - codecForList, - codecForString, - printTestVectors, - NodeThreadCryptoWorkerFactory, - CryptoApi, - rsaBlind, - RecoveryMergeStrategy, - stringToBytes, -} from "@gnu-taler/taler-wallet-core"; -import * as clk from "./clk"; +import * as clk from "./clk.js"; import { deepStrictEqual } from "assert"; -import { getTestInfo, runTests } from "./integrationtests/testrunner"; +import { getTestInfo, runTests } from "./integrationtests/testrunner.js"; +import { PreparePayResultType, setDangerousTimetravel, classifyTalerUri, TalerUriType, RecoveryMergeStrategy, Amounts, addPaytoQueryParams, codecForList, codecForString } from "@gnu-taler/taler-util"; +import { Logger, Wallet, NodeHttpLib, getDefaultNodeWallet, OperationFailedAndReportedError, OperationFailedError, decodeCrock, rsaBlind, NodeThreadCryptoWorkerFactory, CryptoApi } from "@gnu-taler/taler-wallet-core"; // This module also serves as the entry point for the crypto // thread worker, and thus must expose these two handlers. @@ -811,9 +793,6 @@ testCli }); }); -testCli.subcommand("vectors", "vectors").action(async (args) => { - printTestVectors(); -}); async function read(stream: NodeJS.ReadStream) { const chunks = []; diff --git a/packages/taler-wallet-cli/src/integrationtests/harness.ts b/packages/taler-wallet-cli/src/integrationtests/harness.ts index 31f9131a3..65ffdafb5 100644 --- a/packages/taler-wallet-cli/src/integrationtests/harness.ts +++ b/packages/taler-wallet-cli/src/integrationtests/harness.ts @@ -30,81 +30,83 @@ import * as path from "path"; import * as http from "http"; import { deepStrictEqual } from "assert"; import { ChildProcess, spawn } from "child_process"; +import { URL } from "url"; +import axios, { AxiosError } from "axios"; +import { + codecForMerchantOrderPrivateStatusResponse, + codecForPostOrderResponse, + PostOrderRequest, + PostOrderResponse, + MerchantOrderPrivateStatusResponse, + TippingReserveStatus, + TipCreateConfirmation, + TipCreateRequest, + MerchantInstancesResponse, +} from "./merchantApiTypes"; +import { + createEddsaKeyPair, + eddsaGetPublic, + EddsaKeyPair, + encodeCrock, + getRandomBytes, + openPromise, + OperationFailedError, +} from "@gnu-taler/taler-wallet-core"; import { - Configuration, AmountJson, Amounts, + Configuration, + AmountString, Codec, buildCodecForObject, codecForString, Duration, + parsePaytoUri, CoreApiResponse, - PreparePayResult, + ApplyRefundRequest, + ApplyRefundResponse, + codecForApplyRefundResponse, PreparePayRequest, + PreparePayResult, codecForPreparePayResult, - OperationFailedError, - AddExchangeRequest, - ExchangesListRespose, - codecForExchangesListResponse, - GetWithdrawalDetailsForUriRequest, - WithdrawUriInfoResponse, - codecForWithdrawUriInfoResponse, + CreateDepositGroupRequest, + CreateDepositGroupResponse, + AbortPayWithRefundRequest, ConfirmPayRequest, ConfirmPayResult, codecForConfirmPayResult, - IntegrationTestArgs, - TestPayArgs, + PrepareTipRequest, + PrepareTipResult, + codecForPrepareTipResult, + AcceptTipRequest, + CoinDumpJson, + codecForAny, + AddExchangeRequest, + ForceExchangeUpdateRequest, + ForceRefreshRequest, + ExchangesListRespose, + codecForExchangesListResponse, BalancesResponse, codecForBalancesResponse, - encodeCrock, - getRandomBytes, - EddsaKeyPair, - eddsaGetPublic, - createEddsaKeyPair, TransactionsResponse, codecForTransactionsResponse, - WithdrawTestBalanceRequest, - AmountString, - ApplyRefundRequest, - codecForApplyRefundResponse, - codecForAny, - CoinDumpJson, - ForceExchangeUpdateRequest, - ForceRefreshRequest, - PrepareTipResult, - PrepareTipRequest, - codecForPrepareTipResult, - AcceptTipRequest, - AbortPayWithRefundRequest, - openPromise, - parsePaytoUri, - CreateDepositGroupRequest, - CreateDepositGroupResponse, TrackDepositGroupRequest, TrackDepositGroupResponse, + IntegrationTestArgs, + TestPayArgs, + WithdrawTestBalanceRequest, + GetWithdrawalDetailsForUriRequest, + WithdrawUriInfoResponse, + codecForWithdrawUriInfoResponse, + BackupRecovery, RecoveryLoadRequest, -} from "@gnu-taler/taler-wallet-core"; -import { URL } from "url"; -import axios, { AxiosError } from "axios"; -import { - codecForMerchantOrderPrivateStatusResponse, - codecForPostOrderResponse, - PostOrderRequest, - PostOrderResponse, - MerchantOrderPrivateStatusResponse, - TippingReserveStatus, - TipCreateConfirmation, - TipCreateRequest, - MerchantInstancesResponse, -} from "./merchantApiTypes"; -import { ApplyRefundResponse } from "@gnu-taler/taler-wallet-core"; -import { PendingOperationsResponse } from "@gnu-taler/taler-wallet-core"; -import { CoinConfig } from "./denomStructures"; +} from "@gnu-taler/taler-util"; import { AddBackupProviderRequest, BackupInfo, - BackupRecovery, } from "@gnu-taler/taler-wallet-core/src/operations/backup"; +import { PendingOperationsResponse } from "@gnu-taler/taler-wallet-core/src/pending-types"; +import { CoinConfig } from "./denomStructures.js"; const exec = util.promisify(require("child_process").exec); @@ -486,7 +488,7 @@ export async function pingProc( } } -export interface ExchangeBankAccount { +export interface HarnessExchangeBankAccount { accountName: string; accountPassword: string; accountPaytoUri: string; @@ -573,7 +575,7 @@ export namespace BankApi { export async function adminAddIncoming( bank: BankServiceInterface, params: { - exchangeBankAccount: ExchangeBankAccount; + exchangeBankAccount: HarnessExchangeBankAccount; amount: string; reservePub: string; debitAccountPayto: string; @@ -701,7 +703,7 @@ export class BankService implements BankServiceInterface { async createExchangeAccount( accountName: string, password: string, - ): Promise<ExchangeBankAccount> { + ): Promise<HarnessExchangeBankAccount> { await sh( this.globalTestState, "taler-bank-manage_django", @@ -944,7 +946,7 @@ export class ExchangeService implements ExchangeServiceInterface { async addBankAccount( localName: string, - exchangeBankAccount: ExchangeBankAccount, + exchangeBankAccount: HarnessExchangeBankAccount, ): Promise<void> { const config = Configuration.load(this.configFilename); config.setString( diff --git a/packages/taler-wallet-cli/src/integrationtests/helpers.ts b/packages/taler-wallet-cli/src/integrationtests/helpers.ts index bca983758..35146a82c 100644 --- a/packages/taler-wallet-cli/src/integrationtests/helpers.ts +++ b/packages/taler-wallet-cli/src/integrationtests/helpers.ts @@ -24,38 +24,38 @@ * Imports */ import { - GlobalTestState, + FaultInjectedExchangeService, + FaultInjectedMerchantService, +} from "./faultInjection"; +import { CoinConfig, defaultCoinConfig } from "./denomStructures"; +import { + AmountString, + Duration, + ContractTerms, + PreparePayResultType, + ConfirmPayResultType, +} from "@gnu-taler/taler-util"; +import { DbInfo, + BankService, ExchangeService, - WalletCli, MerchantService, + WalletCli, + GlobalTestState, setupDb, - BankService, - ExchangeBankAccount, - MerchantServiceInterface, + ExchangeServiceInterface, BankApi, BankAccessApi, + MerchantServiceInterface, MerchantPrivateApi, - ExchangeServiceInterface, -} from "./harness"; -import { - AmountString, - Duration, - PreparePayResultType, - ConfirmPayResultType, - ContractTerms, -} from "@gnu-taler/taler-wallet-core"; -import { - FaultInjectedExchangeService, - FaultInjectedMerchantService, -} from "./faultInjection"; -import { CoinConfig, defaultCoinConfig } from "./denomStructures"; + HarnessExchangeBankAccount, +} from "./harness.js"; export interface SimpleTestEnvironment { commonDb: DbInfo; bank: BankService; exchange: ExchangeService; - exchangeBankAccount: ExchangeBankAccount; + exchangeBankAccount: HarnessExchangeBankAccount; merchant: MerchantService; wallet: WalletCli; } @@ -154,7 +154,7 @@ export interface FaultyMerchantTestEnvironment { bank: BankService; exchange: ExchangeService; faultyExchange: FaultInjectedExchangeService; - exchangeBankAccount: ExchangeBankAccount; + exchangeBankAccount: HarnessExchangeBankAccount; merchant: MerchantService; faultyMerchant: FaultInjectedMerchantService; wallet: WalletCli; diff --git a/packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts b/packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts index 1326d3a53..2233c7ad2 100644 --- a/packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts +++ b/packages/taler-wallet-cli/src/integrationtests/merchantApiTypes.ts @@ -41,7 +41,7 @@ import { Timestamp, CoinPublicKeyString, EddsaPublicKeyString, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; import { codecForAmountString } from "@gnu-taler/taler-wallet-core/lib/util/amounts"; export interface PostOrderRequest { diff --git a/packages/taler-wallet-cli/src/integrationtests/sync.ts b/packages/taler-wallet-cli/src/integrationtests/sync.ts index 83024ec79..e0f9e22c3 100644 --- a/packages/taler-wallet-cli/src/integrationtests/sync.ts +++ b/packages/taler-wallet-cli/src/integrationtests/sync.ts @@ -18,7 +18,7 @@ * Imports. */ import axios from "axios"; -import { Configuration, URL } from "@gnu-taler/taler-wallet-core"; +import { URL } from "@gnu-taler/taler-wallet-core"; import * as fs from "fs"; import * as util from "util"; import { @@ -30,6 +30,7 @@ import { setupDb, sh, } from "./harness"; +import { Configuration } from "@gnu-taler/taler-util"; const exec = util.promisify(require("child_process").exec); diff --git a/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts b/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts index 1b7deefc5..0d0253d71 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts @@ -28,11 +28,9 @@ import { BankAccessApi, } from "./harness"; import { - PreparePayResultType, - ExchangesListRespose, URL, - TalerErrorCode, } from "@gnu-taler/taler-wallet-core"; +import { ExchangesListRespose, TalerErrorCode } from "@gnu-taler/taler-util"; import { FaultInjectedExchangeService, FaultInjectionResponseContext, diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts index 609ec596f..655f18632 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts @@ -17,11 +17,11 @@ /** * Imports. */ -import { CoreApiResponse } from "@gnu-taler/taler-wallet-core"; +import { CoreApiResponse } from "@gnu-taler/taler-util"; import { CoinConfig, defaultCoinConfig } from "./denomStructures"; import { DbInfo, - ExchangeBankAccount, + HarnessExchangeBankAccount, ExchangeService, GlobalTestState, MerchantService, @@ -44,7 +44,7 @@ const merchantIban = "DE42500105171245624648"; export interface LibeufinTestEnvironment { commonDb: DbInfo; exchange: ExchangeService; - exchangeBankAccount: ExchangeBankAccount; + exchangeBankAccount: HarnessExchangeBankAccount; merchant: MerchantService; wallet: WalletCli; libeufinSandbox: LibeufinSandboxService; @@ -181,7 +181,7 @@ export async function createLibeufinTestEnvironment( database: db.connStr, }); - const exchangeBankAccount: ExchangeBankAccount = { + const exchangeBankAccount: HarnessExchangeBankAccount = { accountName: "twguser", accountPassword: "twgpw", accountPaytoUri: `payto://iban/${exchangeIban}?receiver-name=Exchange`, diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts index 2ceb8be0e..0adabbf4e 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts @@ -17,15 +17,11 @@ /** * Imports. */ -import { CoreApiResponse } from "@gnu-taler/taler-wallet-core"; -import { CoinConfig, defaultCoinConfig } from "./denomStructures"; import { GlobalTestState } from "./harness"; -import { getRandomIban } from "./helpers"; import { SandboxUserBundle, NexusUserBundle, launchLibeufinServices, - LibeufinNexusApi, LibeufinSandboxApi, } from "./libeufin"; diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts index 23fc9126d..271eedbc2 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts @@ -17,13 +17,9 @@ /** * Imports. */ -import { CoreApiResponse } from "@gnu-taler/taler-wallet-core"; -import { CoinConfig, defaultCoinConfig } from "./denomStructures"; import { GlobalTestState } from "./harness"; import { - LibeufinNexusApi, LibeufinNexusService, - LibeufinSandboxApi, LibeufinSandboxService, LibeufinCli, } from "./libeufin"; diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts index a60f7f015..a14b63e00 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts @@ -35,8 +35,7 @@ import { PreparePayResultType, codecForMerchantOrderStatusUnpaid, ConfirmPayResultType, - URL, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; import axios from "axios"; import { FaultInjectedExchangeService, diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts index 17563c027..0f6ba654f 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts @@ -23,9 +23,9 @@ import { PreparePayResultType, codecForMerchantOrderStatusUnpaid, ConfirmPayResultType, - URL, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; import axios from "axios"; +import { URL } from "@gnu-taler/taler-wallet-core"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts index 07ed56397..25c2ea365 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts @@ -33,9 +33,9 @@ import { import { durationFromSpec, PreparePayResultType, - URL, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; import axios from "axios"; +import { URL } from "@gnu-taler/taler-wallet-core"; async function testRefundApiWithFulfillmentUrl( t: GlobalTestState, diff --git a/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts b/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts index 44a81b516..1a4219a94 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts @@ -22,9 +22,8 @@ /** * Imports. */ +import { PreparePayResultType, TalerErrorCode } from "@gnu-taler/taler-util"; import { - PreparePayResultType, - TalerErrorCode, URL, } from "@gnu-taler/taler-wallet-core"; import { diff --git a/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts b/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts index f826bdc6d..575228a8b 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts @@ -26,10 +26,10 @@ import { PreparePayResultType, codecForMerchantOrderStatusUnpaid, ConfirmPayResultType, - URL, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; import axios from "axios"; import { FaultInjectionRequestContext } from "./faultInjection"; +import { URL } from "@gnu-taler/taler-wallet-core"; /** * Run test for the wallets repurchase detection mechanism diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts index 2432c1118..a26b6724b 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts @@ -21,8 +21,8 @@ import { GlobalTestState, MerchantPrivateApi, WalletCli } from "./harness"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { PreparePayResultType, - TalerErrorCode, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; +import { TalerErrorCode } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts index 713f7162f..d467eb66f 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts @@ -37,7 +37,7 @@ import { FaultInjectionRequestContext, FaultInjectionResponseContext, } from "./faultInjection"; -import { CoreApiResponse } from "@gnu-taler/taler-wallet-core"; +import { CoreApiResponse } from "@gnu-taler/taler-util"; import { defaultCoinConfig } from "./denomStructures"; /** diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts index d456554cc..4d7d5f959 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts @@ -19,7 +19,7 @@ */ import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; -import { PreparePayResultType } from "@gnu-taler/taler-wallet-core"; +import { PreparePayResultType } from "@gnu-taler/taler-util"; /** * Test the wallet-core payment API, especially that repeated operations diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts index b9e5670d8..8825def7a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts @@ -22,20 +22,13 @@ import { withdrawViaBank, createFaultInjectedMerchantTestkudosEnvironment, } from "./helpers"; -import { - PreparePayResultType, - codecForMerchantOrderStatusUnpaid, - ConfirmPayResultType, - URL, - codecForExchangeKeysJson, - TalerErrorDetails, - TalerErrorCode, -} from "@gnu-taler/taler-wallet-core"; import axios from "axios"; import { FaultInjectionRequestContext, FaultInjectionResponseContext, } from "./faultInjection"; +import { codecForMerchantOrderStatusUnpaid, ConfirmPayResultType, PreparePayResultType, TalerErrorCode, TalerErrorDetails } from "@gnu-taler/taler-util"; +import { URL } from "@gnu-taler/taler-wallet-core"; /** * Run test for a payment where the merchant has a transient diff --git a/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts b/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts index 4d5fac5c6..85bcbfd0e 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts @@ -23,7 +23,7 @@ import { PreparePayResultType, codecForMerchantOrderStatusUnpaid, ConfirmPayResultType, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; import axios from "axios"; /** diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-auto.ts b/packages/taler-wallet-cli/src/integrationtests/test-refund-auto.ts index 4ec4ff5a6..1b3fb2852 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund-auto.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-refund-auto.ts @@ -19,7 +19,7 @@ */ import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; -import { durationFromSpec } from "@gnu-taler/taler-wallet-core"; +import { durationFromSpec } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts b/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts index 74c99ec37..7158a40af 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts @@ -28,7 +28,7 @@ import { timestampAddDuration, getTimestampNow, timestampTruncateToSecond, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts b/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts index 69d503269..9f961b2b7 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts @@ -23,7 +23,7 @@ import { TransactionType, Amounts, durationFromSpec, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund.ts b/packages/taler-wallet-cli/src/integrationtests/test-refund.ts index c6af7cdc1..b97b21b3e 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-refund.ts @@ -17,7 +17,7 @@ /** * Imports. */ -import { durationFromSpec } from "@gnu-taler/taler-wallet-core"; +import { durationFromSpec } from "@gnu-taler/taler-util"; import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; diff --git a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts b/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts index f7e51e714..c54f667a1 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts @@ -21,9 +21,9 @@ import { ConfirmPayResultType, Duration, durationFromSpec, - PendingOperationsResponse, PreparePayResultType, -} from "@gnu-taler/taler-wallet-core"; +} from "@gnu-taler/taler-util"; +import { PendingOperationsResponse } from "@gnu-taler/taler-wallet-core"; import { makeNoFeeCoinConfig } from "./denomStructures"; import { BankService, diff --git a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts b/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts index 3b2fac582..4af85585a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts @@ -23,7 +23,7 @@ import { withdrawViaBank, startWithdrawViaBank, } from "./helpers"; -import { Duration, TransactionType } from "@gnu-taler/taler-wallet-core"; +import { Duration, TransactionType } from "@gnu-taler/taler-util"; /** * Basic time travel test. diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts b/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts index 94cad7510..ef53046cd 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts @@ -17,12 +17,9 @@ /** * Imports. */ -import { PreparePayResultType } from "@gnu-taler/taler-wallet-core"; -import { testPay } from "@gnu-taler/taler-wallet-core/src/operations/testing"; +import { PreparePayResultType } from "@gnu-taler/taler-util"; import { GlobalTestState, - BankApi, - BankAccessApi, WalletCli, MerchantPrivateApi, } from "./harness"; diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts index 861e616e6..6cd508b25 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts @@ -17,12 +17,9 @@ /** * Imports. */ +import { TalerErrorCode } from "@gnu-taler/taler-util"; import { GlobalTestState, BankApi, BankAccessApi } from "./harness"; import { createSimpleTestkudosEnvironment } from "./helpers"; -import { - codecForBalancesResponse, - TalerErrorCode, -} from "@gnu-taler/taler-wallet-core"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts index e21434ff3..1a3268ada 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts @@ -19,7 +19,7 @@ */ import { GlobalTestState, BankApi, BankAccessApi } from "./harness"; import { createSimpleTestkudosEnvironment } from "./helpers"; -import { codecForBalancesResponse } from "@gnu-taler/taler-wallet-core"; +import { codecForBalancesResponse } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-manual.ts b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-manual.ts index dc0180dea..5921510bf 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-manual.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-manual.ts @@ -19,8 +19,8 @@ */ import { GlobalTestState, BankApi } from "./harness"; import { createSimpleTestkudosEnvironment } from "./helpers"; -import { CoreApiResponse } from "@gnu-taler/taler-wallet-core"; -import { codecForBalancesResponse } from "@gnu-taler/taler-wallet-core"; +import { CoreApiResponse } from "@gnu-taler/taler-util"; +import { codecForBalancesResponse } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-wallet-cli/tsconfig.json b/packages/taler-wallet-cli/tsconfig.json index 5985a516d..5ded91d7a 100644 --- a/packages/taler-wallet-cli/tsconfig.json +++ b/packages/taler-wallet-cli/tsconfig.json @@ -25,6 +25,9 @@ "references": [ { "path": "../taler-wallet-core/" + }, + { + "path": "../taler-util/" } ] } |