From 119c1c708f9922e3e92ff592dcf08a1bd4f2f2e4 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Fri, 31 Jul 2020 00:34:31 +0530
Subject: respond with contract terms as JSON (instead of string) in the wallet
 API

---
 src/webex/pages/pay.tsx | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'src/webex/pages/pay.tsx')

diff --git a/src/webex/pages/pay.tsx b/src/webex/pages/pay.tsx
index d255ab6e5..ce44c0040 100644
--- a/src/webex/pages/pay.tsx
+++ b/src/webex/pages/pay.tsx
@@ -74,9 +74,7 @@ function TalerPayDialog({ talerPayUri }: { talerPayUri: string }): JSX.Element {
   let contractTerms: ContractTerms;
 
   try {
-    contractTerms = codecForContractTerms().decode(
-      JSON.parse(payStatus.contractTerms),
-    );
+    contractTerms = codecForContractTerms().decode(payStatus.contractTerms);
   } catch (e) {
     // This should never happen, as the wallet is supposed to check the contract terms
     // before storing them.
-- 
cgit v1.2.3

