From 32f6409ac312f31821f791c3a376168289f0e4f4 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 23 Mar 2022 10:50:12 -0300 Subject: all the browser related code move into one place, making it easy for specific platform code or mocking for testing --- packages/taler-wallet-webextension/src/context/iocContext.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-webextension/src/context') diff --git a/packages/taler-wallet-webextension/src/context/iocContext.ts b/packages/taler-wallet-webextension/src/context/iocContext.ts index 688e7b488..a24b0c1ca 100644 --- a/packages/taler-wallet-webextension/src/context/iocContext.ts +++ b/packages/taler-wallet-webextension/src/context/iocContext.ts @@ -21,7 +21,7 @@ import { createContext, h, VNode } from "preact"; import { useContext } from "preact/hooks"; -import { findTalerUriInActiveTab } from "../api/browser"; +import { platform } from "../platform/api"; interface Type { findTalerUriInActiveTab: () => Promise; @@ -45,5 +45,5 @@ export const IoCProviderForTesting = ({ value, children }: { value: Type, childr }; export const IoCProviderForRuntime = ({ children }: { children: any }): VNode => { - return h(Context.Provider, { value: { findTalerUriInActiveTab }, children }); + return h(Context.Provider, { value: { findTalerUriInActiveTab: platform.findTalerUriInActiveTab }, children }); }; -- cgit v1.2.3