diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-18 10:47:53 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-18 10:47:53 -0300 |
commit | b34f3568e8c9dde73f11583a6b46ef1509990397 (patch) | |
tree | 2898223d8e67023dbfd2d338eb145bd06b737a71 /packages/taler-wallet-webextension/src/hooks/useSettings.ts | |
parent | b1a0d034fc1be0824e1eac46661604558264beee (diff) | |
download | wallet-core-b34f3568e8c9dde73f11583a6b46ef1509990397.tar.xz |
check if the script should be injected
remove header listener
Diffstat (limited to 'packages/taler-wallet-webextension/src/hooks/useSettings.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/hooks/useSettings.ts | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/packages/taler-wallet-webextension/src/hooks/useSettings.ts b/packages/taler-wallet-webextension/src/hooks/useSettings.ts index 04bce236a..040fee424 100644 --- a/packages/taler-wallet-webextension/src/hooks/useSettings.ts +++ b/packages/taler-wallet-webextension/src/hooks/useSettings.ts @@ -15,14 +15,7 @@ */ import { useLocalStorage } from "@gnu-taler/web-util/lib/index.browser"; - -interface Settings { - injectTalerSupport: boolean; -} - -const defaultSettings: Settings = { - injectTalerSupport: false, -}; +import { Settings, defaultSettings } from "../platform/api.js"; function parse_json_or_undefined<T>(str: string | undefined): T | undefined { if (str === undefined) return undefined; @@ -42,7 +35,6 @@ export function useSettings(): [ const parsed: Settings = parse_json_or_undefined(value) ?? defaultSettings; function updateField<T extends keyof Settings>(k: T, v: Settings[T]) { const newValue = { ...parsed, [k]: v }; - console.log("should update", k, v, parsed, newValue); const json = JSON.stringify(newValue); console.log(json); update(json); |