diff options
Diffstat (limited to 'packages/taler-harness/src')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts index 23c0f938c..aed266eb0 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-handover.ts @@ -27,7 +27,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState } from "../harness/harness.js"; import { - createSimpleTestkudosEnvironmentV2, + createSimpleTestkudosEnvironmentV3, createWalletDaemonWithClient, } from "../harness/helpers.js"; @@ -37,19 +37,17 @@ import { export async function runWithdrawalHandoverTest(t: GlobalTestState) { // Set up test environment - const { walletClient, bank, exchange } = - await createSimpleTestkudosEnvironmentV2(t); + const { walletClient, bankClient, exchange } = + await createSimpleTestkudosEnvironmentV3(t); // Do one normal withdrawal with the new split API { // Create a withdrawal operation - const bankAccessApiClient = new TalerCorebankApiClient( - bank.corebankApiBaseUrl, - ); - const user = await bankAccessApiClient.createRandomBankUser(); - bankAccessApiClient.setAuth(user); - const wop = await bankAccessApiClient.createWithdrawalOperation( + const user = await bankClient.createRandomBankUser(); + const userBankClient = new TalerCorebankApiClient(bankClient.baseUrl); + userBankClient.setAuth(user); + const wop = await userBankClient.createWithdrawalOperation( user.username, "TESTKUDOS:10", ); @@ -90,7 +88,7 @@ export async function runWithdrawalHandoverTest(t: GlobalTestState) { }, }); - await bankAccessApiClient.confirmWithdrawalOperation(user.username, { + await userBankClient.confirmWithdrawalOperation(user.username, { withdrawalOperationId: wop.withdrawal_id, }); @@ -112,12 +110,10 @@ export async function runWithdrawalHandoverTest(t: GlobalTestState) { // Create a withdrawal operation - const bankAccessApiClient = new TalerCorebankApiClient( - bank.corebankApiBaseUrl, - ); - const user = await bankAccessApiClient.createRandomBankUser(); - bankAccessApiClient.setAuth(user); - const wop = await bankAccessApiClient.createWithdrawalOperation( + const user = await bankClient.createRandomBankUser(); + const userBankClient = new TalerCorebankApiClient(bankClient.baseUrl); + userBankClient.setAuth(user); + const wop = await userBankClient.createWithdrawalOperation( user.username, "TESTKUDOS:10", ); @@ -159,7 +155,7 @@ export async function runWithdrawalHandoverTest(t: GlobalTestState) { }, }); - await bankAccessApiClient.confirmWithdrawalOperation(user.username, { + await userBankClient.confirmWithdrawalOperation(user.username, { withdrawalOperationId: wop.withdrawal_id, }); |