From 6106caeba9e017242dfd334c34c8473aefb6ffb0 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 13 Feb 2023 15:32:23 -0300 Subject: [PATCH] fix broken build since wallet-core new api and placeholder for payment-temlate --- .../src/NavigationBar.tsx | 1 + .../src/components/TermsOfService/views.tsx | 37 +++++--- .../src/cta/Payment/test.ts | 36 ++++++++ .../src/cta/PaymentTemplate/index.ts | 56 +++++++++++ .../src/cta/PaymentTemplate/state.ts | 63 +++++++++++++ .../src/cta/PaymentTemplate/stories.tsx | 34 +++++++ .../src/cta/PaymentTemplate/test.ts | 55 +++++++++++ .../src/cta/PaymentTemplate/views.tsx | 29 ++++++ .../src/platform/chrome.ts | 3 + .../src/popup/Application.tsx | 1 + .../src/popup/Balance.stories.tsx | 71 ++++++++++++++ .../src/wallet/Application.tsx | 18 +++- .../src/wallet/DepositPage/test.ts | 26 ++++++ .../src/wallet/History.stories.tsx | 92 +++++++++++++++++++ .../src/wallet/Transaction.stories.tsx | 3 + .../src/wxBackend.ts | 6 ++ 16 files changed, 517 insertions(+), 14 deletions(-) create mode 100644 packages/taler-wallet-webextension/src/cta/PaymentTemplate/index.ts create mode 100644 packages/taler-wallet-webextension/src/cta/PaymentTemplate/state.ts create mode 100644 packages/taler-wallet-webextension/src/cta/PaymentTemplate/stories.tsx create mode 100644 packages/taler-wallet-webextension/src/cta/PaymentTemplate/test.ts create mode 100644 packages/taler-wallet-webextension/src/cta/PaymentTemplate/views.tsx diff --git a/packages/taler-wallet-webextension/src/NavigationBar.tsx b/packages/taler-wallet-webextension/src/NavigationBar.tsx index aa2238753..fb6f280c3 100644 --- a/packages/taler-wallet-webextension/src/NavigationBar.tsx +++ b/packages/taler-wallet-webextension/src/NavigationBar.tsx @@ -117,6 +117,7 @@ export const Pages = { cta: pageDefinition<{ action: string }>("/cta/:action"), ctaPay: "/cta/pay", + ctaPayTemplate: "/cta/payTemplate", ctaRecovery: "/cta/recovery", ctaRefund: "/cta/refund", ctaTips: "/cta/tip", 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({
- The exchange reply with a empty terms of service + The exchange replied with a empty terms of service
)} {terms.content && (
- {terms.content.type === "xml" && ( - - - - )} - {terms.content.type === "plain" && ( -
-
{terms.content.content}
-
- )} + {terms.content.type === "xml" && + (!terms.content.document ? ( + + + No terms of service. The exchange replied with a empty + document + + + ) : ( + + + + ))} + {terms.content.type === "plain" && + (!terms.content.content ? ( + + + No terms of service. The exchange replied with a empty text + + + ) : ( +
+
{terms.content.content}
+
+ ))} {terms.content.type === "html" && (