summaryrefslogtreecommitdiff
path: root/packages/taler-util/src
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-09-17 15:48:33 -0300
committerSebastian <sebasjm@gmail.com>2021-09-17 15:49:07 -0300
commit315b167bee240e625beea731df6472a971b46cb2 (patch)
tree098557be6106622844ad5d59dce7e0c64bb22bcc /packages/taler-util/src
parent490620ad04a677fa220cbe77dc0bea29b6e80c12 (diff)
downloadwallet-core-315b167bee240e625beea731df6472a971b46cb2.tar.gz
wallet-core-315b167bee240e625beea731df6472a971b46cb2.tar.bz2
wallet-core-315b167bee240e625beea731df6472a971b46cb2.zip
issue #5860
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r--packages/taler-util/src/taleruri.ts3
-rw-r--r--packages/taler-util/src/walletTypes.ts6
2 files changed, 9 insertions, 0 deletions
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<PreparePayResul
.property("contractTerms", codecForContractTerms())
.property("proposalId", codecForString())
.property("contractTermsHash", codecForString())
+ .property("noncePriv", codecForString())
.property(
"status",
codecForConstString(PreparePayResultType.PaymentPossible),
@@ -336,6 +337,7 @@ export const codecForPreparePayResultInsufficientBalance = (): Codec<PreparePayR
.property("amountRaw", codecForAmountString())
.property("contractTerms", codecForAny())
.property("proposalId", codecForString())
+ .property("noncePriv", codecForString())
.property(
"status",
codecForConstString(PreparePayResultType.InsufficientBalance),
@@ -354,6 +356,7 @@ export const codecForPreparePayResultAlreadyConfirmed = (): Codec<PreparePayResu
.property("contractTerms", codecForAny())
.property("contractTermsHash", codecForString())
.property("proposalId", codecForString())
+ .property("noncePriv", codecForString())
.build("PreparePayResultAlreadyConfirmed");
export const codecForPreparePayResult = (): Codec<PreparePayResult> =>
@@ -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 {