[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: fix contract terms normalizat
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: fix contract terms normalization |
Date: |
Thu, 27 Jan 2022 14:33:27 +0100 |
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 038aa948 fix contract terms normalization
038aa948 is described below
commit 038aa948eb9fbf2880a88b453373888b5bccbe17
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Jan 27 14:33:23 2022 +0100
fix contract terms normalization
---
packages/taler-util/src/helpers.ts | 5 +----
packages/taler-wallet-cli/src/integrationtests/test-payment.ts | 8 ++++++++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/packages/taler-util/src/helpers.ts
b/packages/taler-util/src/helpers.ts
index 6c836c48..7d84d434 100644
--- a/packages/taler-util/src/helpers.ts
+++ b/packages/taler-util/src/helpers.ts
@@ -63,10 +63,7 @@ export function canonicalJson(obj: any): string {
// Check for cycles, etc.
obj = JSON.parse(JSON.stringify(obj));
if (typeof obj === "string") {
- const s = JSON.stringify(obj);
- return s.replace(/[\u007F-\uFFFF]/g, function (chr) {
- return "\\u" + ("0000" + chr.charCodeAt(0).toString(16)).substr(-4);
- });
+ return JSON.stringify(obj);
}
if (typeof obj === "number" || typeof obj === "boolean" || obj === null) {
return JSON.stringify(obj);
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment.ts
b/packages/taler-wallet-cli/src/integrationtests/test-payment.ts
index 967d491b..d76bb676 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-payment.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-payment.ts
@@ -49,6 +49,14 @@ export async function runPaymentTest(t: GlobalTestState) {
await makeTestPayment(t, { wallet, merchant, order });
+ const order2 = {
+ summary: "Testing “unicode” characters",
+ amount: "TESTKUDOS:5",
+ fulfillment_url: "taler://fulfillment-success/thx",
+ };
+
+ await makeTestPayment(t, { wallet, merchant, order: order2 });
+
await wallet.runUntilDone();
}
--
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: fix contract terms normalization,
gnunet <=