summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts')
-rw-r--r--packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts b/packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts
index 8021db686..8d4921392 100644
--- a/packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts
+++ b/packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts
@@ -15,7 +15,7 @@
*/
import { useState, useEffect } from "preact/hooks";
-import { wxClient } from "../wxApi.js";
+import { wxApi } from "../wxApi.js";
import { ToggleHandler } from "../mui/handlers.js";
import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
@@ -30,7 +30,7 @@ export function useWalletDevMode(): ToggleHandler {
useEffect(() => {
async function getValue(): Promise<void> {
- const res = await wxClient.call(WalletApiOperation.GetVersion, {});
+ const res = await wxApi.wallet.call(WalletApiOperation.GetVersion, {});
setEnabled(res.devMode);
}
getValue();
@@ -49,7 +49,7 @@ async function handleOpen(
onChange: (value: boolean) => void,
): Promise<void> {
const nextValue = !currentValue
- await wxClient.call(WalletApiOperation.SetDevMode, { devModeEnabled: nextValue });
+ await wxApi.wallet.call(WalletApiOperation.SetDevMode, { devModeEnabled: nextValue });
onChange(nextValue);
return;
}