diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-08-20 13:55:03 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-08-20 13:55:03 +0530 |
commit | 786976e5a8e10f6a3eab50cacbefe98d8b2364f5 (patch) | |
tree | 34c4e2e7308c3cd6d676d7a0df4b910b5a30706e /packages/taler-integrationtests/src/helpers.ts | |
parent | 4c296c9c5f5bf10f4c3d61d84a354749b302a18a (diff) | |
download | wallet-core-786976e5a8e10f6a3eab50cacbefe98d8b2364f5.tar.xz |
add bank API tests
Diffstat (limited to 'packages/taler-integrationtests/src/helpers.ts')
-rw-r--r-- | packages/taler-integrationtests/src/helpers.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/taler-integrationtests/src/helpers.ts b/packages/taler-integrationtests/src/helpers.ts index 86f530e09..d33aaff4e 100644 --- a/packages/taler-integrationtests/src/helpers.ts +++ b/packages/taler-integrationtests/src/helpers.ts @@ -34,6 +34,8 @@ import { defaultCoinConfig, ExchangeBankAccount, MerchantServiceInterface, + BankApi, + BankAccessApi, } from "./harness"; import { AmountString } from "taler-wallet-core/lib/types/talerTypes"; import { FaultInjectedMerchantService } from "./faultInjection"; @@ -230,8 +232,8 @@ export async function withdrawViaBank( ): Promise<void> { const { wallet, bank, exchange, amount } = p; - const user = await bank.createRandomBankUser(); - const wop = await bank.createWithdrawalOperation(user, amount); + const user = await BankApi.createRandomBankUser(bank); + const wop = await BankAccessApi.createWithdrawalOperation(bank, user, amount); // Hand it to the wallet @@ -244,7 +246,7 @@ export async function withdrawViaBank( // Confirm it - await bank.confirmWithdrawalOperation(user, wop); + await BankApi.confirmWithdrawalOperation(bank, user, wop); // Withdraw @@ -260,3 +262,4 @@ export async function withdrawViaBank( const balApiResp = await wallet.apiRequest("getBalances", {}); t.assertTrue(balApiResp.type === "response"); } + |