aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-06 12:32:31 +0200
committerFlorian Dold <florian@dold.me>2023-09-06 12:32:31 +0200
commit7450bede5b5809f6a496b7e68852a454386850e5 (patch)
treece4aedaad43ad095e643d96f5897883b70616c03 /packages/taler-harness/src
parent07d71eb29704a148f7e7bb0c064cbbad056d5a50 (diff)
downloadwallet-core-7450bede5b5809f6a496b7e68852a454386850e5.tar.xz
get rid of deprecated bank API client, change allowHttp to requireTls
Diffstat (limited to 'packages/taler-harness/src')
-rw-r--r--packages/taler-harness/src/bench2.ts1
-rw-r--r--packages/taler-harness/src/bench3.ts1
-rw-r--r--packages/taler-harness/src/harness/harness.ts51
-rw-r--r--packages/taler-harness/src/harness/helpers.ts11
-rw-r--r--packages/taler-harness/src/harness/libeufin-apis.ts5
-rw-r--r--packages/taler-harness/src/index.ts15
-rw-r--r--packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts20
-rw-r--r--packages/taler-harness/src/integrationtests/test-bank-api.ts28
-rw-r--r--packages/taler-harness/src/integrationtests/test-exchange-deposit.ts1
-rw-r--r--packages/taler-harness/src/integrationtests/test-exchange-management.ts12
-rw-r--r--packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts1
-rw-r--r--packages/taler-harness/src/integrationtests/test-kyc.ts12
-rw-r--r--packages/taler-harness/src/integrationtests/test-payment-fault.ts14
-rw-r--r--packages/taler-harness/src/integrationtests/test-tipping.ts22
-rw-r--r--packages/taler-harness/src/integrationtests/test-wallet-notifications.ts7
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts7
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts12
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts7
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts22
-rw-r--r--packages/taler-harness/src/lint.ts1
20 files changed, 117 insertions, 133 deletions
diff --git a/packages/taler-harness/src/bench2.ts b/packages/taler-harness/src/bench2.ts
index 48ac76b9f..53db6f6c1 100644
--- a/packages/taler-harness/src/bench2.ts
+++ b/packages/taler-harness/src/bench2.ts
@@ -57,7 +57,6 @@ export async function runBench2(configJson: any): Promise<void> {
const http = createPlatformHttpLib({
enableThrottling: false,
- allowHttp: true,
});
const numIter = benchConf.iterations ?? 1;
diff --git a/packages/taler-harness/src/bench3.ts b/packages/taler-harness/src/bench3.ts
index c7eca90a8..0b5371af5 100644
--- a/packages/taler-harness/src/bench3.ts
+++ b/packages/taler-harness/src/bench3.ts
@@ -52,7 +52,6 @@ export async function runBench3(configJson: any): Promise<void> {
const myHttpLib = createPlatformHttpLib({
enableThrottling: false,
- allowHttp: true,
});
const numIter = b3conf.iterations ?? 1;
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts
index df3c9b215..d0719b4f7 100644
--- a/packages/taler-harness/src/harness/harness.ts
+++ b/packages/taler-harness/src/harness/harness.ts
@@ -25,62 +25,46 @@
* Imports
*/
import {
+ AccountAddDetails,
AmountJson,
Amounts,
- AmountString,
- codecForMerchantOrderPrivateStatusResponse,
- codecForMerchantPostOrderResponse,
- codecForMerchantReserveCreateConfirmation,
Configuration,
CoreApiResponse,
- createEddsaKeyPair,
Duration,
- eddsaGetPublic,
EddsaKeyPair,
+ Logger,
+ MerchantInstanceConfig,
+ PartialMerchantInstanceConfig,
+ TalerError,
+ WalletNotification,
+ createEddsaKeyPair,
+ eddsaGetPublic,
encodeCrock,
hash,
j2s,
- Logger,
- MerchantInstancesResponse,
- MerchantOrderPrivateStatusResponse,
- MerchantPostOrderRequest,
- MerchantPostOrderResponse,
- MerchantReserveCreateConfirmation,
- MerchantTemplateAddDetails,
parsePaytoUri,
stringToBytes,
- TalerError,
- TalerProtocolDuration,
- RewardCreateConfirmation,
- RewardCreateRequest,
- TippingReserveStatus,
- WalletNotification,
- codecForAny,
- AccountAddDetails,
- MerchantInstanceConfig,
- PartialMerchantInstanceConfig,
} from "@gnu-taler/taler-util";
import {
createPlatformHttpLib,
expectSuccessResponseOrThrow,
- readSuccessResponseJsonOrThrow,
} from "@gnu-taler/taler-util/http";
import {
- BankApi,
+ BankAccessApiClient,
BankServiceHandle,
HarnessExchangeBankAccount,
- openPromise,
WalletCoreApiClient,
WalletCoreRequestType,
WalletCoreResponseType,
WalletOperations,
+ openPromise,
} from "@gnu-taler/taler-wallet-core";
import {
+ RemoteWallet,
+ WalletNotificationWaiter,
createRemoteWallet,
getClientFromRemoteWallet,
makeNotificationWaiter,
- RemoteWallet,
- WalletNotificationWaiter,
} from "@gnu-taler/taler-wallet-core/remote";
import { deepStrictEqual } from "assert";
import { ChildProcess, spawn } from "child_process";
@@ -594,7 +578,7 @@ export class FakebankService
{
proc: ProcessWrapper | undefined;
- http = createPlatformHttpLib({ allowHttp: true, enableThrottling: false });
+ http = createPlatformHttpLib({ enableThrottling: false });
// We store "created" accounts during setup and
// register them after startup.
@@ -702,13 +686,9 @@ export class FakebankService
"bank",
);
await this.pingUntilAvailable();
+ const bankClient = new BankAccessApiClient(this.bankAccessApiBaseUrl);
for (const acc of this.accounts) {
- await BankApi.registerAccount(
- this,
- acc.accountName,
- acc.accountPassword,
- {},
- );
+ await bankClient.registerAccount(acc.accountName, acc.accountPassword);
}
}
@@ -1351,7 +1331,6 @@ export interface MerchantServiceInterface {
* Default HTTP client handle for the integration test harness.
*/
export const harnessHttpLib = createPlatformHttpLib({
- allowHttp: true,
enableThrottling: false,
});
diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts
index 7b2f7d8f1..f92fd4dd9 100644
--- a/packages/taler-harness/src/harness/helpers.ts
+++ b/packages/taler-harness/src/harness/helpers.ts
@@ -36,8 +36,7 @@ import {
MerchantApiClient,
} from "@gnu-taler/taler-util";
import {
- BankAccessApi,
- BankApi,
+ BankAccessApiClient,
HarnessExchangeBankAccount,
WalletApiOperation,
} from "@gnu-taler/taler-wallet-core";
@@ -563,8 +562,10 @@ export async function withdrawViaBankV2(
): Promise<WithdrawViaBankResult> {
const { walletClient: wallet, bank, exchange, amount } = p;
- const user = await BankApi.createRandomBankUser(bank);
- const wop = await BankAccessApi.createWithdrawalOperation(bank, user, amount);
+ const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl);
+
+ const user = await bankClient.createRandomBankUser();
+ const wop = await bankClient.createWithdrawalOperation(user.username, amount);
// Hand it to the wallet
@@ -593,7 +594,7 @@ export async function withdrawViaBankV2(
// Confirm it
- await BankApi.confirmWithdrawalOperation(bank, user, wop);
+ await bankClient.confirmWithdrawalOperation(user.username, wop);
return {
withdrawalFinishedCond,
diff --git a/packages/taler-harness/src/harness/libeufin-apis.ts b/packages/taler-harness/src/harness/libeufin-apis.ts
index 0553223cb..0193f9252 100644
--- a/packages/taler-harness/src/harness/libeufin-apis.ts
+++ b/packages/taler-harness/src/harness/libeufin-apis.ts
@@ -176,10 +176,7 @@ export interface LibeufinSandboxAddIncomingRequest {
direction: string;
}
-const libeufinHarnessHttpLib = createPlatformHttpLib({
- allowHttp: true,
- enableThrottling: false,
-});
+const libeufinHarnessHttpLib = createPlatformHttpLib();
/**
* APIs spread across Legacy and Access, it is therefore
diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts
index ed2e545f7..185f6226d 100644
--- a/packages/taler-harness/src/index.ts
+++ b/packages/taler-harness/src/index.ts
@@ -236,14 +236,15 @@ deploymentCli
console.log(tipReserveResp);
- const bankAccessApiClient = new BankAccessApiClient({
- baseUrl: args.tipTopup.bankAccessUrl,
- auth: {
- username: args.tipTopup.bankAccount,
- password: args.tipTopup.bankPassword,
+ const bankAccessApiClient = new BankAccessApiClient(
+ args.tipTopup.bankAccessUrl,
+ {
+ auth: {
+ username: args.tipTopup.bankAccount,
+ password: args.tipTopup.bankPassword,
+ },
},
- allowHttp: true,
- });
+ );
const paytoUri = addPaytoQueryParams(tipReserveResp.accounts[0].payto_uri, {
message: `tip-reserve ${tipReserveResp.reserve_pub}`,
diff --git a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts
index 4e096e0ea..bff13ae40 100644
--- a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts
+++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts
@@ -18,7 +18,7 @@
* Imports.
*/
import {
- BankApi,
+ BankAccessApiClient,
WalletApiOperation,
WireGatewayApiClient,
} from "@gnu-taler/taler-wallet-core";
@@ -179,7 +179,8 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) {
// Pay with coin from tipping
{
- const mbu = await BankApi.createRandomBankUser(bank);
+ const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl);
+ const mbu = await bankClient.createRandomBankUser();
const tipReserveResp = await merchantClient.createTippingReserve({
exchange_url: exchange.baseUrl,
initial_balance: "TESTKUDOS:10",
@@ -191,12 +192,15 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) {
exchangeBankAccount.accountPaytoUri,
);
- const wireGatewayApiClient = new WireGatewayApiClient({
- wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl,
- accountName: exchangeBankAccount.accountName,
- accountPassword: exchangeBankAccount.accountPassword,
- allowHttp: true,
- });
+ const wireGatewayApiClient = new WireGatewayApiClient(
+ exchangeBankAccount.wireGatewayApiBaseUrl,
+ {
+ auth: {
+ username: exchangeBankAccount.accountName,
+ password: exchangeBankAccount.accountPassword,
+ },
+ },
+ );
await wireGatewayApiClient.adminAddIncoming({
amount: "TESTKUDOS:10",
diff --git a/packages/taler-harness/src/integrationtests/test-bank-api.ts b/packages/taler-harness/src/integrationtests/test-bank-api.ts
index e645d60f1..afb06b61a 100644
--- a/packages/taler-harness/src/integrationtests/test-bank-api.ts
+++ b/packages/taler-harness/src/integrationtests/test-bank-api.ts
@@ -19,8 +19,7 @@
*/
import { createEddsaKeyPair, encodeCrock } from "@gnu-taler/taler-util";
import {
- BankAccessApi,
- BankApi,
+ BankAccessApiClient,
CreditDebitIndicator,
WireGatewayApiClient,
} from "@gnu-taler/taler-wallet-core";
@@ -99,17 +98,19 @@ export async function runBankApiTest(t: GlobalTestState) {
console.log("setup done!");
- const bankUser = await BankApi.registerAccount(bank, "user1", "pw1", {});
+ const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl);
+
+ const bankUser = await bankClient.registerAccount("user1", "pw1");
// Make sure that registering twice results in a 409 Conflict
{
const e = await t.assertThrowsTalerErrorAsync(async () => {
- await BankApi.registerAccount(bank, "user1", "pw2", {});
+ await bankClient.registerAccount("user1", "pw1");
});
t.assertTrue(e.errorDetail.httpStatusCode === 409);
}
- let balResp = await BankAccessApi.getAccountBalance(bank, bankUser);
+ let balResp = await bankClient.getAccountBalance(bankUser.username);
console.log(balResp);
@@ -121,12 +122,15 @@ export async function runBankApiTest(t: GlobalTestState) {
const res = createEddsaKeyPair();
- const wireGatewayApiClient = new WireGatewayApiClient({
- wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl,
- accountName: exchangeBankAccount.accountName,
- accountPassword: exchangeBankAccount.accountPassword,
- allowHttp: true,
- });
+ const wireGatewayApiClient = new WireGatewayApiClient(
+ exchangeBankAccount.wireGatewayApiBaseUrl,
+ {
+ auth: {
+ username: exchangeBankAccount.accountName,
+ password: exchangeBankAccount.accountPassword,
+ },
+ },
+ );
await wireGatewayApiClient.adminAddIncoming({
amount: "TESTKUDOS:115",
@@ -134,7 +138,7 @@ export async function runBankApiTest(t: GlobalTestState) {
reservePub: encodeCrock(res.eddsaPub),
});
- balResp = await BankAccessApi.getAccountBalance(bank, bankUser);
+ balResp = await bankClient.getAccountBalance(bankUser.username);
t.assertAmountEquals(balResp.balance.amount, "TESTKUDOS:15");
t.assertTrue(
balResp.balance.credit_debit_indicator === CreditDebitIndicator.Debit,
diff --git a/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts b/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
index 05bbbfaa1..96255f5b5 100644
--- a/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
+++ b/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
@@ -49,7 +49,6 @@ export async function runExchangeDepositTest(t: GlobalTestState) {
const { bank, exchange } = await createSimpleTestkudosEnvironmentV2(t);
const http = createPlatformHttpLib({
- allowHttp: true,
enableThrottling: false,
});
const cryptiDisp = new CryptoDispatcher(
diff --git a/packages/taler-harness/src/integrationtests/test-exchange-management.ts b/packages/taler-harness/src/integrationtests/test-exchange-management.ts
index 718cee0d7..19be7c962 100644
--- a/packages/taler-harness/src/integrationtests/test-exchange-management.ts
+++ b/packages/taler-harness/src/integrationtests/test-exchange-management.ts
@@ -28,8 +28,7 @@ import {
} from "../harness/harness.js";
import {
WalletApiOperation,
- BankApi,
- BankAccessApi,
+ BankAccessApiClient,
} from "@gnu-taler/taler-wallet-core";
import {
ExchangesListResponse,
@@ -266,10 +265,11 @@ export async function runExchangeManagementTest(
// Create withdrawal operation
- const user = await BankApi.createRandomBankUser(bank);
- const wop = await BankAccessApi.createWithdrawalOperation(
- bank,
- user,
+ const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl);
+
+ const user = await bankClient.createRandomBankUser();
+ const wop = await bankClient.createWithdrawalOperation(
+ user.username,
"TESTKUDOS:10",
);
diff --git a/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts b/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts
index 401cc4ff2..2ef7683b3 100644
--- a/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts
+++ b/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts
@@ -94,7 +94,6 @@ function getDenomInfoFromKeys(ek: ExchangeKeysJson): DenomInfo[] {
}
const http = createPlatformHttpLib({
- allowHttp: true,
enableThrottling: false,
});
diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts b/packages/taler-harness/src/integrationtests/test-kyc.ts
index 22c8ce03c..88875d4fc 100644
--- a/packages/taler-harness/src/integrationtests/test-kyc.ts
+++ b/packages/taler-harness/src/integrationtests/test-kyc.ts
@@ -28,8 +28,7 @@ import {
} from "@gnu-taler/taler-util";
import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
import {
- BankAccessApi,
- BankApi,
+ BankAccessApiClient,
WalletApiOperation,
} from "@gnu-taler/taler-wallet-core";
import * as http from "node:http";
@@ -305,9 +304,11 @@ export async function runKycTest(t: GlobalTestState) {
// Withdraw digital cash into the wallet.
+ const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl);
+
const amount = "TESTKUDOS:20";
- const user = await BankApi.createRandomBankUser(bank);
- const wop = await BankAccessApi.createWithdrawalOperation(bank, user, amount);
+ const user = await bankClient.createRandomBankUser();
+ const wop = await bankClient.createWithdrawalOperation(user.username, amount);
// Hand it to the wallet
@@ -332,7 +333,7 @@ export async function runKycTest(t: GlobalTestState) {
// Confirm it
- await BankApi.confirmWithdrawalOperation(bank, user, wop);
+ await bankClient.confirmWithdrawalOperation(user.username, wop);
const kycNotificationCond = walletClient.waitForNotificationCond((x) => {
if (
@@ -376,7 +377,6 @@ export async function runKycTest(t: GlobalTestState) {
// which would usually done in the browser.
const httpLib = createPlatformHttpLib({
- allowHttp: true,
enableThrottling: false,
});
const kycServerResp = await httpLib.fetch(kycUrl);
diff --git a/packages/taler-harness/src/integrationtests/test-payment-fault.ts b/packages/taler-harness/src/integrationtests/test-payment-fault.ts
index 70fa587e7..3ad11d82d 100644
--- a/packages/taler-harness/src/integrationtests/test-payment-fault.ts
+++ b/packages/taler-harness/src/integrationtests/test-payment-fault.ts
@@ -23,8 +23,7 @@
*/
import { CoreApiResponse, MerchantApiClient } from "@gnu-taler/taler-util";
import {
- BankAccessApi,
- BankApi,
+ BankAccessApiClient,
WalletApiOperation,
} from "@gnu-taler/taler-wallet-core";
import { defaultCoinConfig } from "../harness/denomStructures.js";
@@ -127,10 +126,11 @@ export async function runPaymentFaultTest(t: GlobalTestState) {
// Create withdrawal operation
- const user = await BankApi.createRandomBankUser(bank);
- const wop = await BankAccessApi.createWithdrawalOperation(
- bank,
- user,
+ const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl);
+
+ const user = await bankClient.createRandomBankUser();
+ const wop = await bankClient.createWithdrawalOperation(
+ user.username,
"TESTKUDOS:20",
);
@@ -152,7 +152,7 @@ export async function runPaymentFaultTest(t: GlobalTestState) {
// Confirm it
- await BankApi.confirmWithdrawalOperation(bank, user, wop);
+ await bankClient.confirmWithdrawalOperation(user.username, wop);
await wallet.runUntilDone();
diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts
index f4a7c020e..9b980acad 100644
--- a/packages/taler-harness/src/integrationtests/test-tipping.ts
+++ b/packages/taler-harness/src/integrationtests/test-tipping.ts
@@ -38,10 +38,9 @@ export async function runTippingTest(t: GlobalTestState) {
const { walletClient, bank, exchange, merchant, exchangeBankAccount } =
await createSimpleTestkudosEnvironmentV2(t);
- const bankAccessApiClient = new BankAccessApiClient({
- allowHttp: true,
- baseUrl: bank.bankAccessApiBaseUrl,
- });
+ const bankAccessApiClient = new BankAccessApiClient(
+ bank.bankAccessApiBaseUrl,
+ );
const mbu = await bankAccessApiClient.createRandomBankUser();
const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl());
@@ -59,12 +58,15 @@ export async function runTippingTest(t: GlobalTestState) {
exchangeBankAccount.accountPaytoUri,
);
- const wireGatewayApiClient = new WireGatewayApiClient({
- wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl,
- accountName: exchangeBankAccount.accountName,
- accountPassword: exchangeBankAccount.accountPassword,
- allowHttp: true,
- });
+ const wireGatewayApiClient = new WireGatewayApiClient(
+ exchangeBankAccount.wireGatewayApiBaseUrl,
+ {
+ auth: {
+ username: exchangeBankAccount.accountName,
+ password: exchangeBankAccount.accountPassword,
+ },
+ },
+ );
await wireGatewayApiClient.adminAddIncoming({
amount: "TESTKUDOS:10",
diff --git a/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts b/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts
index 3315a71d4..9b35884f0 100644
--- a/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts
+++ b/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts
@@ -123,10 +123,9 @@ export async function runWalletNotificationsTest(t: GlobalTestState) {
skipDefaults: true,
});
- const bankAccessApiClient = new BankAccessApiClient({
- allowHttp: true,
- baseUrl: bank.bankAccessApiBaseUrl,
- });
+ const bankAccessApiClient = new BankAccessApiClient(
+ bank.bankAccessApiBaseUrl,
+ );
const user = await bankAccessApiClient.createRandomBankUser();
bankAccessApiClient.setAuth(user);
const wop = await bankAccessApiClient.createWithdrawalOperation(
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts
index 1ba180fc1..c62b98623 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts
@@ -36,10 +36,9 @@ export async function runWithdrawalAbortBankTest(t: GlobalTestState) {
// Create a withdrawal operation
- const bankAccessApiClient = new BankAccessApiClient({
- allowHttp: true,
- baseUrl: bank.bankAccessApiBaseUrl,
- });
+ const bankAccessApiClient = new BankAccessApiClient(
+ bank.bankAccessApiBaseUrl,
+ );
const user = await bankAccessApiClient.createRandomBankUser();
bankAccessApiClient.setAuth(user);
const wop = await bankAccessApiClient.createWithdrawalOperation(
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts
index 61687ec02..76c973a12 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts
@@ -19,7 +19,10 @@
*/
import { GlobalTestState } from "../harness/harness.js";
import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js";
-import { BankAccessApiClient, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import {
+ BankAccessApiClient,
+ WalletApiOperation,
+} from "@gnu-taler/taler-wallet-core";
import {
j2s,
NotificationType,
@@ -40,10 +43,9 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) {
// Create a withdrawal operation
- const bankAccessApiClient = new BankAccessApiClient({
- allowHttp: true,
- baseUrl: bank.bankAccessApiBaseUrl,
- });
+ const bankAccessApiClient = new BankAccessApiClient(
+ bank.bankAccessApiBaseUrl,
+ );
const user = await bankAccessApiClient.createRandomBankUser();
bankAccessApiClient.setAuth(user);
const wop = await bankAccessApiClient.createWithdrawalOperation(
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts
index 34dfb8fc9..9f4631c7e 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts
@@ -110,10 +110,9 @@ export async function runWithdrawalFeesTest(t: GlobalTestState) {
const amount = "TESTKUDOS:7.5";
- const bankAccessApiClient = new BankAccessApiClient({
- allowHttp: true,
- baseUrl: bank.bankAccessApiBaseUrl,
- });
+ const bankAccessApiClient = new BankAccessApiClient(
+ bank.bankAccessApiBaseUrl,
+ );
const user = await bankAccessApiClient.createRandomBankUser();
bankAccessApiClient.setAuth(user);
const wop = await bankAccessApiClient.createWithdrawalOperation(
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
index d49235f89..324b8abc5 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
@@ -39,10 +39,9 @@ export async function runWithdrawalManualTest(t: GlobalTestState) {
// Create a withdrawal operation
- const bankAccessApiClient = new BankAccessApiClient({
- baseUrl: bank.bankAccessApiBaseUrl,
- allowHttp: true,
- });
+ const bankAccessApiClient = new BankAccessApiClient(
+ bank.bankAccessApiBaseUrl,
+ );
const user = await bankAccessApiClient.createRandomBankUser();
@@ -74,12 +73,15 @@ export async function runWithdrawalManualTest(t: GlobalTestState) {
const reservePub: string = wres.reservePub;
- const wireGatewayApiClient = new WireGatewayApiClient({
- wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl,
- accountName: exchangeBankAccount.accountName,
- accountPassword: exchangeBankAccount.accountPassword,
- allowHttp: true,
- });
+ const wireGatewayApiClient = new WireGatewayApiClient(
+ exchangeBankAccount.wireGatewayApiBaseUrl,
+ {
+ auth: {
+ username: exchangeBankAccount.accountName,
+ password: exchangeBankAccount.accountPassword,
+ },
+ },
+ );
await wireGatewayApiClient.adminAddIncoming({
amount: "TESTKUDOS:10",
diff --git a/packages/taler-harness/src/lint.ts b/packages/taler-harness/src/lint.ts
index 6d8e679db..a45e6db9d 100644
--- a/packages/taler-harness/src/lint.ts
+++ b/packages/taler-harness/src/lint.ts
@@ -55,7 +55,6 @@ interface PubkeyConf {
const httpLib = createPlatformHttpLib({
enableThrottling: false,
- allowHttp: true,
});
interface ShellResult {