aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/taleruri.ts
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-08-31 13:12:06 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-08-31 13:12:06 +0200
commit94cfcc875065f988815c31aaf8ebf36f75ac5983 (patch)
tree8389a638c67a3ae2d57fb354da1df6378e82113f /packages/taler-util/src/taleruri.ts
parente02a4eb990c8c54662fbb658695312bdfce492e0 (diff)
parent79973a63dd31c0d84b677a2a1511b1dffc6218b8 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'packages/taler-util/src/taleruri.ts')
-rw-r--r--packages/taler-util/src/taleruri.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/taler-util/src/taleruri.ts b/packages/taler-util/src/taleruri.ts
index fff1ca833..310986eaf 100644
--- a/packages/taler-util/src/taleruri.ts
+++ b/packages/taler-util/src/taleruri.ts
@@ -63,7 +63,7 @@ export interface RefundUriResult {
export interface RewardUriResult {
type: TalerUriAction.Reward;
merchantBaseUrl: string;
- merchantTipId: string;
+ merchantRewardId: string;
}
export interface ExchangeUri {
@@ -408,7 +408,7 @@ export function parseRewardUri(s: string): RewardUriResult | undefined {
return undefined;
}
const host = parts[0].toLowerCase();
- const tipId = parts[parts.length - 1];
+ const rewardId = parts[parts.length - 1];
const pathSegments = parts.slice(1, parts.length - 1);
const hostAndSegments = [host, ...pathSegments].join("/");
const merchantBaseUrl = canonicalizeBaseUrl(
@@ -418,7 +418,7 @@ export function parseRewardUri(s: string): RewardUriResult | undefined {
return {
type: TalerUriAction.Reward,
merchantBaseUrl,
- merchantTipId: tipId,
+ merchantRewardId: rewardId,
};
}
@@ -701,10 +701,10 @@ export function stringifyRefundUri({
}
export function stringifyRewardUri({
merchantBaseUrl,
- merchantTipId,
+ merchantRewardId,
}: Omit<RewardUriResult, "type">): string {
const { proto, path } = getUrlInfo(merchantBaseUrl);
- return `${proto}://reward/${path}${merchantTipId}`;
+ return `${proto}://reward/${path}${merchantRewardId}`;
}
export function stringifyExchangeUri({