aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-09-03 17:33:11 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-09-03 17:33:11 +0530
commitbf9c2ae7f9c24168ddea2ef9387c5a624287d993 (patch)
treea0f688f5b40c3449ad0445342428da61cb637435
parent09b5bfe0db8271c0c7531e22e3123d7e29e2bb1e (diff)
add proposalId in preparePay responsev0.7.1-dev.25
fixes https://bugs.taler.net/n/6535
-rw-r--r--packages/taler-wallet-core/src/operations/pay.ts3
-rw-r--r--packages/taler-wallet-core/src/types/walletTypes.ts2
2 files changed, 5 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts
index ce71737d1..2c491ec6c 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -1085,6 +1085,7 @@ export async function preparePayForUri(
paid: true,
amountRaw: Amounts.stringify(purchase.contractData.amount),
amountEffective: Amounts.stringify(purchase.payCostInfo.totalCost),
+ proposalId,
};
} else if (!purchase.timestampFirstSuccessfulPay) {
return {
@@ -1094,6 +1095,7 @@ export async function preparePayForUri(
paid: false,
amountRaw: Amounts.stringify(purchase.contractData.amount),
amountEffective: Amounts.stringify(purchase.payCostInfo.totalCost),
+ proposalId,
};
} else {
const paid = !purchase.paymentSubmitPending;
@@ -1105,6 +1107,7 @@ export async function preparePayForUri(
amountRaw: Amounts.stringify(purchase.contractData.amount),
amountEffective: Amounts.stringify(purchase.payCostInfo.totalCost),
...(paid ? { nextUrl: purchase.contractData.orderId } : {}),
+ proposalId,
};
}
}
diff --git a/packages/taler-wallet-core/src/types/walletTypes.ts b/packages/taler-wallet-core/src/types/walletTypes.ts
index 01fd95e05..bde4fee66 100644
--- a/packages/taler-wallet-core/src/types/walletTypes.ts
+++ b/packages/taler-wallet-core/src/types/walletTypes.ts
@@ -416,6 +416,7 @@ export const codecForPreparePayResultAlreadyConfirmed = (): Codec<
.property("paid", codecForBoolean())
.property("contractTerms", codecForAny())
.property("contractTermsHash", codecForString())
+ .property("proposalId", codecForString())
.build("PreparePayResultAlreadyConfirmed");
export const codecForPreparePayResult = (): Codec<PreparePayResult> =>
@@ -462,6 +463,7 @@ export interface PreparePayResultAlreadyConfirmed {
amountRaw: string;
amountEffective: string;
contractTermsHash: string;
+ proposalId: string;
}
export interface BankWithdrawDetails {