diff options
author | Sebastian <sebasjm@gmail.com> | 2022-10-25 12:23:08 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-10-25 19:19:09 -0300 |
commit | a286649b0a611d87916a178a795c1acd2917741c (patch) | |
tree | 86d0a8eefb791ffebc877a88d6876d1ff764cf2b /packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts | |
parent | 5fcd434f662bcef7e9e043763766c8b104ad6b97 (diff) | |
download | wallet-core-a286649b0a611d87916a178a795c1acd2917741c.tar.xz |
cherry-pick: using new wallet typed api missing test
Diffstat (limited to 'packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/hooks/useWalletDevMode.ts | 6 |
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; } |