From 315b167bee240e625beea731df6472a971b46cb2 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 17 Sep 2021 15:48:33 -0300 Subject: issue #5860 --- packages/taler-util/src/taleruri.ts | 3 +++ packages/taler-util/src/walletTypes.ts | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'packages/taler-util/src') diff --git a/packages/taler-util/src/taleruri.ts b/packages/taler-util/src/taleruri.ts index 6c0dc7b86..09c70682a 100644 --- a/packages/taler-util/src/taleruri.ts +++ b/packages/taler-util/src/taleruri.ts @@ -22,6 +22,7 @@ export interface PayUriResult { orderId: string; sessionId: string; claimToken: string | undefined; + noncePriv: string | undefined; } export interface WithdrawUriResult { @@ -147,6 +148,7 @@ export function parsePayUri(s: string): PayUriResult | undefined { const c = pi?.rest.split("?"); const q = new URLSearchParams(c[1] ?? ""); const claimToken = q.get("c") ?? undefined; + const noncePriv = q.get("n") ?? undefined; const parts = c[0].split("/"); if (parts.length < 3) { return undefined; @@ -163,6 +165,7 @@ export function parsePayUri(s: string): PayUriResult | undefined { orderId, sessionId: sessionId, claimToken, + noncePriv, }; } diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts index 79403ac69..2b35423bc 100644 --- a/packages/taler-util/src/walletTypes.ts +++ b/packages/taler-util/src/walletTypes.ts @@ -325,6 +325,7 @@ export const codecForPreparePayResultPaymentPossible = (): Codec => @@ -385,6 +388,7 @@ export interface PreparePayResultPaymentPossible { contractTermsHash: string; amountRaw: string; amountEffective: string; + noncePriv: string; } export interface PreparePayResultInsufficientBalance { @@ -392,6 +396,7 @@ export interface PreparePayResultInsufficientBalance { proposalId: string; contractTerms: ContractTerms; amountRaw: string; + noncePriv: string; } export interface PreparePayResultAlreadyConfirmed { @@ -402,6 +407,7 @@ export interface PreparePayResultAlreadyConfirmed { amountEffective: string; contractTermsHash: string; proposalId: string; + noncePriv: string; } export interface BankWithdrawDetails { -- cgit v1.2.3