diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Notifications/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Notifications/state.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Notifications/state.ts b/packages/taler-wallet-webextension/src/wallet/Notifications/state.ts index 093722cf0..1042dea9f 100644 --- a/packages/taler-wallet-webextension/src/wallet/Notifications/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/Notifications/state.ts @@ -15,11 +15,12 @@ */ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { useBackendContext } from "../../context/backend.js"; import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js"; -import { wxApi } from "../../wxApi.js"; import { Props, State } from "./index.js"; -export function useComponentState({}: Props, api: typeof wxApi): State { +export function useComponentState(p: Props): State { + const api = useBackendContext() const hook = useAsyncAsHook(async () => { return await api.wallet.call( WalletApiOperation.GetUserAttentionRequests, |