aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts27
1 files changed, 16 insertions, 11 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
index a356a5c1a..d49235f89 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
@@ -17,14 +17,14 @@
/**
* Imports.
*/
-import { GlobalTestState } from "../harness/harness.js";
-import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
+import { AbsoluteTime, Logger, j2s } from "@gnu-taler/taler-util";
import {
+ BankAccessApiClient,
WalletApiOperation,
- BankApi,
WireGatewayApiClient,
} from "@gnu-taler/taler-wallet-core";
-import { AbsoluteTime, j2s, Logger } from "@gnu-taler/taler-util";
+import { GlobalTestState } from "../harness/harness.js";
+import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js";
const logger = new Logger("test-withdrawal-manual.ts");
@@ -34,14 +34,19 @@ const logger = new Logger("test-withdrawal-manual.ts");
export async function runWithdrawalManualTest(t: GlobalTestState) {
// Set up test environment
- const { wallet, bank, exchange, exchangeBankAccount } =
- await createSimpleTestkudosEnvironment(t);
+ const { walletClient, bank, exchange, exchangeBankAccount } =
+ await createSimpleTestkudosEnvironmentV2(t);
// Create a withdrawal operation
- const user = await BankApi.createRandomBankUser(bank);
+ const bankAccessApiClient = new BankAccessApiClient({
+ baseUrl: bank.bankAccessApiBaseUrl,
+ allowHttp: true,
+ });
+
+ const user = await bankAccessApiClient.createRandomBankUser();
- await wallet.client.call(WalletApiOperation.AddExchange, {
+ await walletClient.call(WalletApiOperation.AddExchange, {
exchangeBaseUrl: exchange.baseUrl,
});
@@ -50,7 +55,7 @@ export async function runWithdrawalManualTest(t: GlobalTestState) {
logger.info("starting AcceptManualWithdrawal request");
// We expect this to return immediately.
- const wres = await wallet.client.call(
+ const wres = await walletClient.call(
WalletApiOperation.AcceptManualWithdrawal,
{
exchangeBaseUrl: exchange.baseUrl,
@@ -84,11 +89,11 @@ export async function runWithdrawalManualTest(t: GlobalTestState) {
await exchange.runWirewatchOnce();
- await wallet.runUntilDone();
+ await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
// Check balance
- const balResp = await wallet.client.call(WalletApiOperation.GetBalances, {});
+ const balResp = await walletClient.call(WalletApiOperation.GetBalances, {});
t.assertAmountEquals("TESTKUDOS:9.72", balResp.balances[0].available);
await t.shutdown();