From 6106caeba9e017242dfd334c34c8473aefb6ffb0 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 13 Feb 2023 15:32:23 -0300
Subject: fix broken build since wallet-core new api and placeholder for
 payment-temlate

---
 .../src/components/TermsOfService/views.tsx        | 37 +++++++++++++++-------
 1 file changed, 26 insertions(+), 11 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx')

diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx
index 0b5a71b3e..415ee1605 100644
--- a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx
+++ b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx
@@ -142,23 +142,38 @@ export function ShowTosContentView({
         <section style={{ justifyContent: "space-around", display: "flex" }}>
           <WarningBox>
             <i18n.Translate>
-              The exchange reply with a empty terms of service
+              The exchange replied with a empty terms of service
             </i18n.Translate>
           </WarningBox>
         </section>
       )}
       {terms.content && (
         <section style={{ justifyContent: "space-around", display: "flex" }}>
-          {terms.content.type === "xml" && (
-            <TermsOfService>
-              <ExchangeXmlTos doc={terms.content.document} />
-            </TermsOfService>
-          )}
-          {terms.content.type === "plain" && (
-            <div style={{ textAlign: "left" }}>
-              <pre>{terms.content.content}</pre>
-            </div>
-          )}
+          {terms.content.type === "xml" &&
+            (!terms.content.document ? (
+              <WarningBox>
+                <i18n.Translate>
+                  No terms of service. The exchange replied with a empty
+                  document
+                </i18n.Translate>
+              </WarningBox>
+            ) : (
+              <TermsOfService>
+                <ExchangeXmlTos doc={terms.content.document} />
+              </TermsOfService>
+            ))}
+          {terms.content.type === "plain" &&
+            (!terms.content.content ? (
+              <WarningBox>
+                <i18n.Translate>
+                  No terms of service. The exchange replied with a empty text
+                </i18n.Translate>
+              </WarningBox>
+            ) : (
+              <div style={{ textAlign: "left" }}>
+                <pre>{terms.content.content}</pre>
+              </div>
+            ))}
           {terms.content.type === "html" && (
             <iframe src={terms.content.href.toString()} />
           )}
-- 
cgit v1.2.3

