From a957e61a9ca05c35e6f40697a343f8c815b6edea Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 2 May 2023 09:56:44 -0300 Subject: fix #7828 --- .../src/wallet/AddNewActionView.tsx | 26 ++++++++++------------ .../src/wallet/Application.tsx | 4 ++-- .../src/wallet/QrReader.tsx | 26 ++++++++++++---------- 3 files changed, 28 insertions(+), 28 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet') diff --git a/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx b/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx index 68a90f8b5..7f142f58b 100644 --- a/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx +++ b/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx @@ -13,13 +13,13 @@ You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see */ -import { classifyTalerUri, TalerUriType } from "@gnu-taler/taler-util"; +import { parseTalerUri, TalerUriAction } from "@gnu-taler/taler-util"; +import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { platform } from "../platform/foreground.js"; import { InputWithLabel } from "../components/styled/index.js"; -import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser"; import { Button } from "../mui/Button.js"; +import { platform } from "../platform/foreground.js"; export interface Props { onCancel: () => Promise; @@ -27,19 +27,17 @@ export interface Props { export function AddNewActionView({ onCancel }: Props): VNode { const [url, setUrl] = useState(""); - const uriType = classifyTalerUri(url); + const uri = parseTalerUri(url); const { i18n } = useTranslationContext(); async function redirectToWallet(): Promise { - platform.openWalletURIFromPopup(url); + platform.openWalletURIFromPopup(uri!); } return (
- +
Cancel - {uriType !== TalerUriType.Unknown && ( + {uri && ( -- cgit v1.2.3