aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-01-27 14:33:23 +0100
committerFlorian Dold <florian@dold.me>2022-01-27 14:33:23 +0100
commit038aa948eb9fbf2880a88b453373888b5bccbe17 (patch)
tree50632a4d7329238ee6e0eb7d645f0b84a30a8f20 /packages/taler-util
parent7719d4d249cc4846788c6d004506da849fc2b7e8 (diff)
fix contract terms normalization
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/helpers.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/packages/taler-util/src/helpers.ts b/packages/taler-util/src/helpers.ts
index 6c836c482..7d84d434e 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);