summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/context/iocContext.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/context/iocContext.ts')
-rw-r--r--packages/taler-wallet-webextension/src/context/iocContext.ts27
1 files changed, 20 insertions, 7 deletions
diff --git a/packages/taler-wallet-webextension/src/context/iocContext.ts b/packages/taler-wallet-webextension/src/context/iocContext.ts
index aaf1f8b67..d875d9c76 100644
--- a/packages/taler-wallet-webextension/src/context/iocContext.ts
+++ b/packages/taler-wallet-webextension/src/context/iocContext.ts
@@ -32,18 +32,31 @@ const Context = createContext<Type>({
/**
* Inversion of control Context
- *
- * This context act as a proxy between API that need to be replaced in
+ *
+ * This context act as a proxy between API that need to be replaced in
* different environments
- *
- * @returns
+ *
+ * @returns
*/
export const useIocContext = (): Type => useContext(Context);
-export const IoCProviderForTesting = ({ value, children }: { value: Type, children: any }): VNode => {
+export const IoCProviderForTesting = ({
+ value,
+ children,
+}: {
+ value: Type;
+ children: any;
+}): VNode => {
return h(Context.Provider, { value, children });
};
-export const IoCProviderForRuntime = ({ children }: { children: any }): VNode => {
- return h(Context.Provider, { value: { findTalerUriInActiveTab: platform.findTalerUriInActiveTab }, children });
+export const IoCProviderForRuntime = ({
+ children,
+}: {
+ children: any;
+}): VNode => {
+ return h(Context.Provider, {
+ value: { findTalerUriInActiveTab: platform.findTalerUriInActiveTab },
+ children,
+ });
};