summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-04-15 18:04:42 -0300
committerSebastian <sebasjm@gmail.com>2022-04-18 16:20:53 -0300
commit9d997280d36b3bd41532017a167410db4dcec696 (patch)
tree55c72b7bdea1b0e65756f10a6dfc03dc30e9ba9e /packages/taler-wallet-webextension/src/cta
parentb3b1329acf9072e9a727b548d9d1b316ca396c33 (diff)
downloadwallet-core-9d997280d36b3bd41532017a167410db4dcec696.tar.gz
wallet-core-9d997280d36b3bd41532017a167410db4dcec696.tar.bz2
wallet-core-9d997280d36b3bd41532017a167410db4dcec696.zip
missing tests
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta')
-rw-r--r--packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.stories.tsx14
-rw-r--r--packages/taler-wallet-webextension/src/cta/return-coins.tsx35
2 files changed, 11 insertions, 38 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.stories.tsx b/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.stories.tsx
index f24da1e13..4a0296baa 100644
--- a/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.stories.tsx
+++ b/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.stories.tsx
@@ -60,11 +60,19 @@ export const ReviewingHTML = createExample(TestedComponent, {
});
function toBase64(str: string): string {
- return btoa(
- encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
+ const encoded = encodeURIComponent(str).replace(
+ /%([0-9A-F]{2})/g,
+ function (match, p1) {
return String.fromCharCode(parseInt(p1, 16));
- }),
+ },
);
+ if (typeof btoa === "undefined") {
+ //nodejs
+ return Buffer.from(encoded).toString("base64");
+ } else {
+ //browser
+ return btoa(encoded);
+ }
}
export const ReviewingPDF = createExample(TestedComponent, {
diff --git a/packages/taler-wallet-webextension/src/cta/return-coins.tsx b/packages/taler-wallet-webextension/src/cta/return-coins.tsx
deleted file mode 100644
index ae2bb07b6..000000000
--- a/packages/taler-wallet-webextension/src/cta/return-coins.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- This file is part of TALER
- (C) 2017 Inria
-
- TALER is free software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 3, or (at your option) any later version.
-
- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along with
- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- */
-
-import { h, VNode } from "preact";
-import { useTranslationContext } from "../context/translation.js";
-/**
- * Return coins to own bank account.
- *
- * @author sebasjm
- */
-
-/**
- * Imports.
- */
-export function CreateReturnCoinsPage(): VNode {
- const { i18n } = useTranslationContext();
- return (
- <span>
- <i18n.Translate>Not implemented yet.</i18n.Translate>
- </span>
- );
-}