summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/Settings.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Settings.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Settings.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Settings.tsx b/packages/taler-wallet-webextension/src/wallet/Settings.tsx
index 64a96d643..b704b585e 100644
--- a/packages/taler-wallet-webextension/src/wallet/Settings.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Settings.tsx
@@ -25,7 +25,7 @@ import {
WalletCoreVersion,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { useTranslationContext } from "@gnu-taler/web-util/browser";
+import { useApiContext, useTranslationContext } from "@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
import { Pages } from "../NavigationBar.js";
import { Checkbox } from "../components/Checkbox.js";
@@ -231,6 +231,7 @@ type Options = {
};
function AdvanceSettings(): VNode {
const [settings, updateSettings] = useSettings();
+ const api = useBackendContext();
const { i18n } = useTranslationContext();
const o: Options = {
backup: {
@@ -287,6 +288,7 @@ function AdvanceSettings(): VNode {
enabled={settings[settingsName]}
onToggle={async () => {
updateSettings(settingsName, !settings[settingsName]);
+ await api.background.call("reinitWallet", undefined);
}}
/>
);