summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations
diff options
context:
space:
mode:
authorms <ms@taler.net>2021-11-13 12:53:48 +0100
committerms <ms@taler.net>2021-11-13 12:55:15 +0100
commit9692f589c687a2ba39a705ca4238cf123f444c61 (patch)
tree009e873d2ab1fa89c141b8ebb3d4775fdaaad62e /packages/taler-wallet-core/src/operations
parent50b9f2167cb4acfae2158bc3c7e1f7173064195d (diff)
downloadwallet-core-9692f589c687a2ba39a705ca4238cf123f444c61.tar.gz
wallet-core-9692f589c687a2ba39a705ca4238cf123f444c61.tar.bz2
wallet-core-9692f589c687a2ba39a705ca4238cf123f444c61.zip
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.
Diffstat (limited to 'packages/taler-wallet-core/src/operations')
-rw-r--r--packages/taler-wallet-core/src/operations/pay.ts5
-rw-r--r--packages/taler-wallet-core/src/operations/testing.ts3
2 files changed, 6 insertions, 2 deletions
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}`,
};