aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/payto.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/taler-util/src/payto.ts b/packages/taler-util/src/payto.ts
index 314c8cdbc..a471d0b87 100644
--- a/packages/taler-util/src/payto.ts
+++ b/packages/taler-util/src/payto.ts
@@ -72,6 +72,7 @@ export interface PaytoUriTalerBank extends PaytoUriGeneric {
export interface PaytoUriBitcoin extends PaytoUriGeneric {
isKnown: true;
targetType: "bitcoin";
+ address: string;
segwitAddrs: Array<string>;
}
@@ -101,10 +102,12 @@ export function buildPayto(
): PaytoUriGeneric {
switch (type) {
case "bitcoin": {
+ const uppercased = first.toUpperCase();
const result: PaytoUriBitcoin = {
isKnown: true,
targetType: "bitcoin",
targetPath: first,
+ address: uppercased,
params: {},
segwitAddrs: !second ? [] : generateFakeSegwitAddress(second, first),
};
@@ -247,10 +250,12 @@ export function parsePaytoUri(s: string): PaytoUri | undefined {
? []
: generateFakeSegwitAddress(reserve, targetPath);
+ const uppercased = targetType.toUpperCase();
const result: PaytoUriBitcoin = {
isKnown: true,
targetPath,
targetType,
+ address: uppercased,
params,
segwitAddrs,
};