aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/context
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-03-23 10:50:12 -0300
committerSebastian <sebasjm@gmail.com>2022-03-23 10:58:57 -0300
commit32f6409ac312f31821f791c3a376168289f0e4f4 (patch)
treec77c660bb85cf359faf74b5cddbe95eb0a915c5e /packages/taler-wallet-webextension/src/context
parentc539d1803c1376cba0831be64866b6d2c1652403 (diff)
downloadwallet-core-32f6409ac312f31821f791c3a376168289f0e4f4.tar.xz
all the browser related code move into one place, making it easy for specific platform code or mocking for testing
Diffstat (limited to 'packages/taler-wallet-webextension/src/context')
-rw-r--r--packages/taler-wallet-webextension/src/context/iocContext.ts4
1 files changed, 2 insertions, 2 deletions
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<string | undefined>;
@@ -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 });
};