From 9692f589c687a2ba39a705ca4238cf123f444c61 Mon Sep 17 00:00:00 2001 From: ms Date: Sat, 13 Nov 2021 12:53:48 +0100 Subject: Bring euFin-based tests to pass. Note: timetravel-withdraw is now failing for both pybank and eufin. That is likely due to the wallet not refreshing expired denominations. --- packages/taler-wallet-core/src/operations/pay.ts | 5 ++++- packages/taler-wallet-core/src/operations/testing.ts | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-core/src') diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts index a42480f40..acc592a72 100644 --- a/packages/taler-wallet-core/src/operations/pay.ts +++ b/packages/taler-wallet-core/src/operations/pay.ts @@ -175,7 +175,7 @@ export async function getEffectiveDepositAmount( for (let i = 0; i < pcs.coinPubs.length; i++) { const coin = await tx.coins.get(pcs.coinPubs[i]); if (!coin) { - throw Error("can't calculate deposit amountt, coin not found"); + throw Error("can't calculate deposit amount, coin not found"); } const denom = await tx.denominations.get([ coin.exchangeBaseUrl, @@ -193,6 +193,9 @@ export async function getEffectiveDepositAmount( if (!exchangeDetails) { continue; } + // FIXME/NOTE: the line below _likely_ throws exception + // about "find method not found on undefined" when the wireType + // is not supported by the Exchange. const fee = exchangeDetails.wireInfo.feesForType[wireType].find((x) => { return timestampIsBetween( getTimestampNow(), diff --git a/packages/taler-wallet-core/src/operations/testing.ts b/packages/taler-wallet-core/src/operations/testing.ts index d2071cd53..d6f0626dd 100644 --- a/packages/taler-wallet-core/src/operations/testing.ts +++ b/packages/taler-wallet-core/src/operations/testing.ts @@ -174,7 +174,8 @@ async function registerRandomBankUser( const reqUrl = new URL("testing/register", bankBaseUrl).href; const randId = makeId(8); const bankUser: BankUser = { - username: `testuser-${randId}`, + // euFin doesn't allow resource names to have upper case letters. + username: `testuser-${randId.toLowerCase()}`, password: `testpw-${randId}`, }; -- cgit v1.2.3