aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/payto.ts
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-10-06 16:33:05 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-10-06 16:33:05 +0200
commitfe7b51ef2736edbf04f5bbd9d19f2a2d04baccc2 (patch)
tree66c68c8d6a666f6e74dc663c9ee4f07879f6626c /packages/taler-util/src/payto.ts
parent35611f0bf9cf67638b171c2a300fab1797d3d8f0 (diff)
parent97d7be7503168f4f3bbd05905d32aa76ca1636b2 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'packages/taler-util/src/payto.ts')
-rw-r--r--packages/taler-util/src/payto.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/taler-util/src/payto.ts b/packages/taler-util/src/payto.ts
index 60c4ba838..85870afcd 100644
--- a/packages/taler-util/src/payto.ts
+++ b/packages/taler-util/src/payto.ts
@@ -89,12 +89,13 @@ export function buildPayto(
return result;
}
case "iban": {
+ const uppercased = first.toUpperCase()
const result: PaytoUriIBAN = {
isKnown: true,
targetType: "iban",
- iban: first,
+ iban: uppercased,
params: {},
- targetPath: !second ? first : `${second}/${first}`,
+ targetPath: !second ? uppercased : `${second}/${uppercased}`,
};
return result;
}
@@ -200,13 +201,13 @@ export function parsePaytoUri(s: string): PaytoUri | undefined {
let iban: string | undefined = undefined;
let bic: string | undefined = undefined;
if (parts.length === 1) {
- iban = parts[0];
+ iban = parts[0].toUpperCase();
}
if (parts.length === 2) {
bic = parts[0];
- iban = parts[1];
+ iban = parts[1].toUpperCase();
} else {
- iban = targetPath;
+ iban = targetPath.toUpperCase();
}
return {
isKnown: true,