[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 03/03: fix: cta header, fix: do not reset ToS ETAG w
From: |
gnunet |
Subject: |
[taler-wallet-core] 03/03: fix: cta header, fix: do not reset ToS ETAG when getting the exchange ToS |
Date: |
Mon, 24 Jan 2022 13:46:32 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit 0aa26448d45da1a27c465dbf2f7ca8adc59da234
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Jan 20 14:21:30 2022 -0300
fix: cta header, fix: do not reset ToS ETAG when getting the exchange ToS
---
packages/taler-wallet-webextension/src/permissions.ts | 12 ++++--------
.../taler-wallet-webextension/src/walletEntryPoint.tsx | 15 ++++++++++-----
packages/taler-wallet-webextension/src/wxBackend.ts | 10 +++++-----
3 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/packages/taler-wallet-webextension/src/permissions.ts
b/packages/taler-wallet-webextension/src/permissions.ts
index 6b6f99a8..fe863080 100644
--- a/packages/taler-wallet-webextension/src/permissions.ts
+++ b/packages/taler-wallet-webextension/src/permissions.ts
@@ -14,11 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-export const getReadRequestPermissions = () =>
- chrome.runtime.getManifest().manifest_version === 3 ? ({
- permissions: ["webRequest"],
- origins: ["http://*/*", "https://*/*"],
- }) : ({
- permissions: ["webRequest", "webRequestBlocking"],
- origins: ["http://*/*", "https://*/*"],
- });
+export const getReadRequestPermissions = () => ({
+ permissions: ["webRequest"],
+ origins: ["http://*/*", "https://*/*"],
+})
\ No newline at end of file
diff --git a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
index 85e38d85..dbcf053e 100644
--- a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
+++ b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
@@ -22,7 +22,7 @@
import { setupI18n } from "@gnu-taler/taler-util";
import { createHashHistory } from "history";
-import { h, render, VNode } from "preact";
+import { Fragment, h, render, VNode } from "preact";
import Router, { route, Route } from "preact-router";
import Match from "preact-router/match";
import { useEffect, useState } from "preact/hooks";
@@ -86,14 +86,19 @@ function Application(): VNode {
<DevContextProvider>
{({ devMode }: { devMode: boolean }) => (
<IoCProviderForRuntime>
- <LogoHeader />
{/* <Match/> won't work in the first render if <Router /> is not
called first */}
{/* https://github.com/preactjs/preact-router/issues/415 */}
<Router history={hash_history} />
<Match>
- {({ path }: { path: string }) => (
- <NavBar devMode={devMode} path={path} />
- )}
+ {({ path }: { path: string }) => {
+ if (path && path.startsWith("/cta")) return;
+ return (
+ <Fragment>
+ <LogoHeader />
+ <NavBar devMode={devMode} path={path} />
+ </Fragment>
+ );
+ }}
</Match>
<WalletBox>
{globalNotification && (
diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts
b/packages/taler-wallet-webextension/src/wxBackend.ts
index 3feb232d..085d7045 100644
--- a/packages/taler-wallet-webextension/src/wxBackend.ts
+++ b/packages/taler-wallet-webextension/src/wxBackend.ts
@@ -396,10 +396,10 @@ function headerListener(
}
function setupHeaderListener(): void {
- if (chrome.runtime.getManifest().manifest_version === 3) {
- console.error("cannot block request on manfest v3")
- return
- }
+ // if (chrome.runtime.getManifest().manifest_version === 3) {
+ // console.error("cannot block request on manfest v3")
+ // return
+ // }
console.log("setting up header listener");
// Handlers for catching HTTP requests
getPermissionsApi().contains(getReadRequestPermissions(), (result: boolean)
=> {
@@ -415,7 +415,7 @@ function setupHeaderListener(): void {
chrome.webRequest.onHeadersReceived.addListener(
headerListener,
{ urls: ["<all_urls>"] },
- ["responseHeaders", "blocking"],
+ ["responseHeaders"]
);
}
if ("webRequest" in chrome) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.