From 9bb9d149d2734e724aa1b53dbbcbc71c9f79b42e Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Thu, 11 Aug 2022 12:28:02 -0300
Subject: qr reader

---
 packages/taler-wallet-webextension/src/wallet/Application.tsx | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'packages/taler-wallet-webextension/src/wallet/Application.tsx')

diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx
index f6cef7e90..f559e54db 100644
--- a/packages/taler-wallet-webextension/src/wallet/Application.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx
@@ -51,6 +51,8 @@ import { ProviderDetailPage } from "./ProviderDetailPage.js";
 import { SettingsPage } from "./Settings.js";
 import { TransactionPage } from "./Transaction.js";
 import { WelcomePage } from "./Welcome.js";
+import { QrReaderPage } from "./QrReader.js";
+import { platform } from "../platform/api.js";
 
 export function Application(): VNode {
   const [globalNotification, setGlobalNotification] = useState<
@@ -162,6 +164,14 @@ export function Application(): VNode {
               {/**
                * PENDING
                */}
+              <Route
+                path={Pages.qr}
+                component={QrReaderPage}
+                onDetected={(talerActionUrl: string) => {
+                  platform.openWalletURIFromPopup(talerActionUrl);
+                }}
+              />
+
               <Route path={Pages.settings} component={SettingsPage} />
 
               {/**
-- 
cgit v1.2.3

