diff options
Diffstat (limited to 'packages/taler-harness/src/harness')
-rw-r--r-- | packages/taler-harness/src/harness/harness.ts | 25 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/helpers.ts | 13 |
2 files changed, 25 insertions, 13 deletions
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index fd34fe241..136ec3d15 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -25,7 +25,6 @@ * Imports */ import { - AccountAddDetails, AccountRestriction, AmountJson, Amounts, @@ -36,8 +35,10 @@ import { Logger, MerchantInstanceConfig, PartialMerchantInstanceConfig, + PaytoString, TalerCorebankApiClient, TalerError, + TalerMerchantApi, WalletNotification, createEddsaKeyPair, eddsaGetPublic, @@ -780,8 +781,16 @@ export class LibeufinBankService config.setString("libeufin-bank", "port", `${bc.httpPort}`); config.setString("libeufin-bank", "serve", "tcp"); config.setString("libeufin-bank", "wire_type", "x-taler-bank"); - config.setString("libeufin-bank", "x_taler_bank_payto_hostname", "localhost"); - config.setString("libeufin-bank", "default_debt_limit", bc.maxDebt ?? `${bc.currency}:100`); + config.setString( + "libeufin-bank", + "x_taler_bank_payto_hostname", + "localhost", + ); + config.setString( + "libeufin-bank", + "default_debt_limit", + bc.maxDebt ?? `${bc.currency}:100`, + ); config.setString( "libeufin-bank", "DEFAULT_DEBT_LIMIT", @@ -896,9 +905,9 @@ export interface BankServiceHandle { readonly corebankApiBaseUrl: string; readonly http: HttpRequestLibrary; - setSuggestedExchange(exchange: ExchangeService, exchangePayto: string): void - start(): Promise<void> - pingUntilAvailable(): Promise<void> + setSuggestedExchange(exchange: ExchangeService, exchangePayto: string): void; + start(): Promise<void>; + pingUntilAvailable(): Promise<void>; } export type BankService = BankServiceHandle; @@ -1779,8 +1788,8 @@ export class MerchantService implements MerchantServiceInterface { const accountCreateUrl = `http://localhost:${this.merchantConfig.httpPort}/instances/${instanceConfig.id}/private/accounts`; for (const paytoUri of instanceConfig.paytoUris) { - const accountReq: AccountAddDetails = { - payto_uri: paytoUri, + const accountReq: TalerMerchantApi.AccountAddDetails = { + payto_uri: paytoUri as PaytoString, }; const acctResp = await harnessHttpLib.fetch(accountCreateUrl, { method: "POST", diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index efcef8706..4e3ce66b9 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -29,11 +29,11 @@ import { Duration, Logger, MerchantApiClient, - MerchantContractTerms, NotificationType, PartialWalletRunConfig, PreparePayResultType, TalerCorebankApiClient, + TalerMerchantApi, TransactionMajorState, WalletNotification, } from "@gnu-taler/taler-util"; @@ -100,7 +100,7 @@ export interface SimpleTestEnvironmentNg { */ export interface SimpleTestEnvironmentNg3 { commonDb: DbInfo; - bankClient: TalerCorebankApiClient, + bankClient: TalerCorebankApiClient; exchange: ExchangeService; exchangeBankAccount: HarnessExchangeBankAccount; merchant: MerchantService; @@ -808,7 +808,7 @@ export async function withdrawViaBankV3( t: GlobalTestState, p: { walletClient: WalletClient; - bankClient: TalerCorebankApiClient, + bankClient: TalerCorebankApiClient; exchange: ExchangeServiceInterface; amount: AmountString | string; restrictAge?: number; @@ -823,7 +823,10 @@ export async function withdrawViaBankV3( password: user.password, }); - const wop = await bankClient2.createWithdrawalOperation(user.username, amount); + const wop = await bankClient2.createWithdrawalOperation( + user.username, + amount, + ); // Hand it to the wallet @@ -898,7 +901,7 @@ export async function makeTestPaymentV2( args: { merchant: MerchantServiceInterface; walletClient: WalletClient; - order: Partial<MerchantContractTerms>; + order: TalerMerchantApi.Order; instance?: string; }, auth: WithAuthorization = {}, |