aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-kyc.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-kyc.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-kyc.ts24
1 files changed, 11 insertions, 13 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts b/packages/taler-harness/src/integrationtests/test-kyc.ts
index 0fe24d708..1f7358b66 100644
--- a/packages/taler-harness/src/integrationtests/test-kyc.ts
+++ b/packages/taler-harness/src/integrationtests/test-kyc.ts
@@ -18,6 +18,7 @@
* Imports.
*/
import {
+ BankAccessApiClient,
Duration,
j2s,
Logger,
@@ -26,11 +27,9 @@ import {
TransactionMinorState,
TransactionType,
} from "@gnu-taler/taler-util";
-import {
- BankAccessApi,
- BankApi,
- WalletApiOperation,
-} from "@gnu-taler/taler-wallet-core";
+import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import * as http from "node:http";
import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
import {
BankService,
@@ -43,8 +42,6 @@ import {
WalletService,
} from "../harness/harness.js";
import { EnvOptions, SimpleTestEnvironmentNg } from "../harness/helpers.js";
-import * as http from "node:http";
-import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
const logger = new Logger("test-kyc.ts");
@@ -162,7 +159,7 @@ export async function createKycTestkudosEnvironment(
await merchant.start();
await merchant.pingUntilAvailable();
- await merchant.addInstance({
+ await merchant.addInstanceWithWireAccount({
id: "default",
name: "Default Instance",
paytoUris: [getPayto("merchant-default")],
@@ -171,7 +168,7 @@ export async function createKycTestkudosEnvironment(
),
});
- await merchant.addInstance({
+ await merchant.addInstanceWithWireAccount({
id: "minst1",
name: "minst1",
paytoUris: [getPayto("minst1")],
@@ -305,9 +302,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 +331,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 +375,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);