From 5f3c02d31a223add55a32b20f4a289210cbb4f15 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 18 Jan 2021 23:35:41 +0100 Subject: implement deposits --- .../src/integrationtests/harness.ts | 43 +++++++++++++++------- 1 file changed, 29 insertions(+), 14 deletions(-) (limited to 'packages/taler-wallet-cli/src/integrationtests/harness.ts') diff --git a/packages/taler-wallet-cli/src/integrationtests/harness.ts b/packages/taler-wallet-cli/src/integrationtests/harness.ts index b6b82213d..eb14b32b9 100644 --- a/packages/taler-wallet-cli/src/integrationtests/harness.ts +++ b/packages/taler-wallet-cli/src/integrationtests/harness.ts @@ -78,6 +78,10 @@ import { AbortPayWithRefundRequest, openPromise, parsePaytoUri, + CreateDepositGroupRequest, + CreateDepositGroupResponse, + TrackDepositGroupRequest, + TrackDepositGroupResponse, } from "taler-wallet-core"; import { URL } from "url"; import axios, { AxiosError } from "axios"; @@ -873,6 +877,9 @@ export class ExchangeService implements ExchangeServiceInterface { config.setString("exchangedb-postgres", "config", e.database); + config.setString("taler-exchange-secmod-eddsa", "lookahead_sign", "20 s"); + config.setString("taler-exchange-secmod-rsa", "lookahead_sign", "20 s"); + const exchangeMasterKey = createEddsaKeyPair(); config.setString( @@ -1017,13 +1024,7 @@ export class ExchangeService implements ExchangeServiceInterface { this.globalState, "exchange-offline", "taler-exchange-offline", - [ - "-c", - this.configFilename, - "download", - "sign", - "upload", - ], + ["-c", this.configFilename, "download", "sign", "upload"], ); const accounts: string[] = []; @@ -1049,13 +1050,7 @@ export class ExchangeService implements ExchangeServiceInterface { this.globalState, "exchange-offline", "taler-exchange-offline", - [ - "-c", - this.configFilename, - "enable-account", - acc, - "upload", - ], + ["-c", this.configFilename, "enable-account", acc, "upload"], ); } @@ -1615,6 +1610,16 @@ export class WalletCli { throw new OperationFailedError(resp.error); } + async createDepositGroup( + req: CreateDepositGroupRequest, + ): Promise { + const resp = await this.apiRequest("createDepositGroup", req); + if (resp.type === "response") { + return resp.result as CreateDepositGroupResponse; + } + throw new OperationFailedError(resp.error); + } + async abortFailedPayWithRefund( req: AbortPayWithRefundRequest, ): Promise { @@ -1714,6 +1719,16 @@ export class WalletCli { throw new OperationFailedError(resp.error); } + async trackDepositGroup( + req: TrackDepositGroupRequest, + ): Promise { + const resp = await this.apiRequest("trackDepositGroup", req); + if (resp.type === "response") { + return resp.result as TrackDepositGroupResponse; + } + throw new OperationFailedError(resp.error); + } + async runIntegrationTest(args: IntegrationTestArgs): Promise { const resp = await this.apiRequest("runIntegrationTest", args); if (resp.type === "response") { -- cgit v1.2.3