diff options
author | Florian Dold <florian@dold.me> | 2021-01-14 17:24:44 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-01-14 17:24:44 +0100 |
commit | 6293de7bfa4d8a52091b251e2333e9710ce1b22a (patch) | |
tree | 79fa71811fff50886568fcd4a5f5d9406565e9d9 /packages/taler-wallet-cli/src/integrationtests/helpers.ts | |
parent | 657c4b6377d405640d353a8c5e15dbb6ac59800b (diff) | |
download | wallet-core-6293de7bfa4d8a52091b251e2333e9710ce1b22a.tar.xz |
fix reserve state machine bug, use simpler denominations in revocation test
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/helpers.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/helpers.ts | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/helpers.ts b/packages/taler-wallet-cli/src/integrationtests/helpers.ts index c51c306c9..f9051ccc0 100644 --- a/packages/taler-wallet-cli/src/integrationtests/helpers.ts +++ b/packages/taler-wallet-cli/src/integrationtests/helpers.ts @@ -45,8 +45,11 @@ import { ConfirmPayResultType, ContractTerms, } from "taler-wallet-core"; -import { FaultInjectedExchangeService, FaultInjectedMerchantService } from "./faultInjection"; -import { defaultCoinConfig } from "./denomStructures"; +import { + FaultInjectedExchangeService, + FaultInjectedMerchantService, +} from "./faultInjection"; +import { CoinConfig, defaultCoinConfig } from "./denomStructures"; export interface SimpleTestEnvironment { commonDb: DbInfo; @@ -63,6 +66,7 @@ export interface SimpleTestEnvironment { */ export async function createSimpleTestkudosEnvironment( t: GlobalTestState, + coinConfig: CoinConfig[] = defaultCoinConfig.map((x) => x("TESTKUDOS")), ): Promise<SimpleTestEnvironment> { const db = await setupDb(t); @@ -99,7 +103,7 @@ export async function createSimpleTestkudosEnvironment( await bank.pingUntilAvailable(); - exchange.addOfferedCoins(defaultCoinConfig); + exchange.addCoinConfigList(coinConfig); await exchange.start(); await exchange.pingUntilAvailable(); @@ -139,7 +143,7 @@ export interface FaultyMerchantTestEnvironment { commonDb: DbInfo; bank: BankService; exchange: ExchangeService; - faultyExchange: FaultInjectedExchangeService, + faultyExchange: FaultInjectedExchangeService; exchangeBankAccount: ExchangeBankAccount; merchant: MerchantService; faultyMerchant: FaultInjectedMerchantService; @@ -185,7 +189,10 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( ); exchange.addBankAccount("1", exchangeBankAccount); - bank.setSuggestedExchange(faultyExchange, exchangeBankAccount.accountPaytoUri); + bank.setSuggestedExchange( + faultyExchange, + exchangeBankAccount.accountPaytoUri, + ); await bank.start(); |