diff options
author | Florian Dold <florian@dold.me> | 2021-06-17 13:34:59 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-17 13:35:08 +0200 |
commit | 5df7ddba97aa4482c781bfe8e87f60c3bc195ae4 (patch) | |
tree | 0956d310a83f0fafbb7d5a93001566f9035269a0 /packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts | |
parent | 0b4976601fe2ecb0462fe72ae188b5cbba06d9cc (diff) | |
download | wallet-core-5df7ddba97aa4482c781bfe8e87f60c3bc195ae4.tar.gz wallet-core-5df7ddba97aa4482c781bfe8e87f60c3bc195ae4.tar.bz2 wallet-core-5df7ddba97aa4482c781bfe8e87f60c3bc195ae4.zip |
use the new wallet core API interface in all tests
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts index 12e594c44..4a02b2708 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts @@ -20,6 +20,7 @@ import { GlobalTestState, BankApi, BankAccessApi } from "./harness"; import { createSimpleTestkudosEnvironment } from "./helpers"; import { codecForBalancesResponse } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; /** * Run test for basic, bank-integrated withdrawal. @@ -40,10 +41,9 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { // Hand it to the wallet - const r1 = await wallet.apiRequest("getWithdrawalDetailsForUri", { + const r1 = await wallet.client.call(WalletApiOperation.GetWithdrawalDetailsForUri, { talerWithdrawUri: wop.taler_withdraw_uri, }); - t.assertTrue(r1.type === "response"); await wallet.runPending(); @@ -53,18 +53,15 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { // Withdraw - const r2 = await wallet.apiRequest("acceptBankIntegratedWithdrawal", { + const r2 = await wallet.client.call(WalletApiOperation.AcceptBankIntegratedWithdrawal, { exchangeBaseUrl: exchange.baseUrl, talerWithdrawUri: wop.taler_withdraw_uri, }); - t.assertTrue(r2.type === "response"); await wallet.runUntilDone(); // Check balance - const balApiResp = await wallet.apiRequest("getBalances", {}); - t.assertTrue(balApiResp.type === "response"); - const balResp = codecForBalancesResponse().decode(balApiResp.result); + const balResp = await wallet.client.call(WalletApiOperation.GetBalances, {}); t.assertAmountEquals("TESTKUDOS:9.72", balResp.balances[0].available); await t.shutdown(); |