[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: merchant test: pass h_contrac
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: merchant test: pass h_contract |
Date: |
Fri, 06 Aug 2021 11:45:15 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 9026b0aa merchant test: pass h_contract
9026b0aa is described below
commit 9026b0aaada91262084f5eefbd3fa46c8ecb3c64
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Aug 6 11:45:08 2021 +0200
merchant test: pass h_contract
---
packages/taler-util/src/walletTypes.ts | 2 ++
.../src/integrationtests/test-merchant-exchange-confusion.ts | 8 ++++++--
packages/taler-wallet-core/src/operations/pay.ts | 1 +
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/packages/taler-util/src/walletTypes.ts
b/packages/taler-util/src/walletTypes.ts
index 4d49db02..e789b469 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -324,6 +324,7 @@ export const codecForPreparePayResultPaymentPossible = ():
Codec<PreparePayResul
.property("amountRaw", codecForAmountString())
.property("contractTerms", codecForContractTerms())
.property("proposalId", codecForString())
+ .property("contractTermsHash", codecForString())
.property(
"status",
codecForConstString(PreparePayResultType.PaymentPossible),
@@ -381,6 +382,7 @@ export interface PreparePayResultPaymentPossible {
status: PreparePayResultType.PaymentPossible;
proposalId: string;
contractTerms: ContractTerms;
+ contractTermsHash: string;
amountRaw: string;
amountEffective: string;
}
diff --git
a/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts
b/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts
index b556c966..4cf9c39b 100644
---
a/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts
+++
b/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts
@@ -44,6 +44,7 @@ import {
} from "./faultInjection";
import { defaultCoinConfig } from "./denomStructures";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { URL } from "url";
/**
* Run a test case with a simple TESTKUDOS Taler environment, consisting
@@ -211,9 +212,12 @@ export async function runMerchantExchangeConfusionTest(t:
GlobalTestState) {
const proposalId = preparePayResp.proposalId;
- console.log("requesting", publicOrderStatusUrl);
+ const orderUrlWithHash = new URL(publicOrderStatusUrl);
+ orderUrlWithHash.searchParams.set("h_contract",
preparePayResp.contractTermsHash);
- publicOrderStatusResp = await axios.get(publicOrderStatusUrl, {
+ console.log("requesting", orderUrlWithHash.href);
+
+ publicOrderStatusResp = await axios.get(orderUrlWithHash.href, {
validateStatus: () => true,
});
diff --git a/packages/taler-wallet-core/src/operations/pay.ts
b/packages/taler-wallet-core/src/operations/pay.ts
index fed61428..54049feb 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -1392,6 +1392,7 @@ export async function checkPaymentByProposalId(
proposalId: proposal.proposalId,
amountEffective: Amounts.stringify(totalCost),
amountRaw: Amounts.stringify(res.paymentAmount),
+ contractTermsHash: d.contractData.contractTermsHash,
};
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: merchant test: pass h_contract,
gnunet <=