aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/context/iocContext.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-06-06 00:09:25 -0300
committerSebastian <sebasjm@gmail.com>2022-06-06 00:09:25 -0300
commitfb6aff76d2152d95caa2ba6cb0d91cb01e0687fe (patch)
tree2dc9b0a4935f60ba7229fd81332ec4a41ad4698c /packages/taler-wallet-webextension/src/context/iocContext.ts
parent912813fd09ee2f757e4d6d509a911159b46153a7 (diff)
downloadwallet-core-fb6aff76d2152d95caa2ba6cb0d91cb01e0687fe.tar.xz
prettier
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,
+ });
};