diff options
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-revocation.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-revocation.ts | 21 |
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); } |