aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-17 13:34:59 +0200
committerFlorian Dold <florian@dold.me>2021-06-17 13:35:08 +0200
commit5df7ddba97aa4482c781bfe8e87f60c3bc195ae4 (patch)
tree0956d310a83f0fafbb7d5a93001566f9035269a0 /packages/taler-wallet-cli/src/integrationtests/test-revocation.ts
parent0b4976601fe2ecb0462fe72ae188b5cbba06d9cc (diff)
downloadwallet-core-5df7ddba97aa4482c781bfe8e87f60c3bc195ae4.tar.xz
use the new wallet core API interface in all tests
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-revocation.ts')
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-revocation.ts21
1 files changed, 14 insertions, 7 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts b/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts
index cf1eded12..fc1ffb267 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts
@@ -17,6 +17,7 @@
/**
* Imports.
*/
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { CoinConfig } from "./denomStructures";
import {
GlobalTestState,
@@ -39,7 +40,7 @@ async function revokeAllWalletCoins(req: {
merchant: MerchantService;
}): Promise<void> {
const { wallet, exchange, merchant } = req;
- const coinDump = await wallet.dumpCoins();
+ const coinDump = await wallet.client.call(WalletApiOperation.DumpCoins, {});
console.log(coinDump);
const usedDenomHashes = new Set<string>();
for (const coin of coinDump.coins) {
@@ -160,10 +161,13 @@ export async function runRevocationTest(t: GlobalTestState) {
// FIXME: this shouldn't be necessary once https://bugs.taler.net/n/6565
// is implemented.
- await wallet.forceUpdateExchange({ exchangeBaseUrl: exchange.baseUrl });
+ await wallet.client.call(WalletApiOperation.AddExchange, {
+ exchangeBaseUrl: exchange.baseUrl,
+ forceUpdate: true,
+ });
await wallet.runUntilDone();
await wallet.runUntilDone();
- const bal = await wallet.getBalances();
+ const bal = await wallet.client.call(WalletApiOperation.GetBalances, {});
console.log("wallet balance", bal);
const order = {
@@ -177,10 +181,10 @@ export async function runRevocationTest(t: GlobalTestState) {
wallet.deleteDatabase();
await withdrawViaBank(t, { wallet, bank, exchange, amount: "TESTKUDOS:15" });
- const coinDump = await wallet.dumpCoins();
+ const coinDump = await wallet.client.call(WalletApiOperation.DumpCoins, {});
console.log(coinDump);
const coinPubList = coinDump.coins.map((x) => x.coin_pub);
- await wallet.forceRefresh({
+ await wallet.client.call(WalletApiOperation.ForceRefresh, {
coinPubList,
});
await wallet.runUntilDone();
@@ -190,11 +194,14 @@ export async function runRevocationTest(t: GlobalTestState) {
// FIXME: this shouldn't be necessary once https://bugs.taler.net/n/6565
// is implemented.
- await wallet.forceUpdateExchange({ exchangeBaseUrl: exchange.baseUrl });
+ await wallet.client.call(WalletApiOperation.AddExchange, {
+ exchangeBaseUrl: exchange.baseUrl,
+ forceUpdate: true,
+ });
await wallet.runUntilDone();
await wallet.runUntilDone();
{
- const bal = await wallet.getBalances();
+ const bal = await wallet.client.call(WalletApiOperation.GetBalances, {});
console.log("wallet balance", bal);
}