diff options
author | Sebastian <sebasjm@gmail.com> | 2023-11-20 12:38:16 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-11-20 12:38:16 -0300 |
commit | 6138846050563e0dca95b0b6d792776925e4c35f (patch) | |
tree | b33cd36acf4b38d3a016506d4f7fa681c83beb63 /packages/aml-backoffice-ui/src/context/config.ts | |
parent | 7ed3e78f790837479fc2bb2eb6ddc40c78ce59b5 (diff) | |
download | wallet-core-6138846050563e0dca95b0b6d792776925e4c35f.tar.xz |
new forms api
Diffstat (limited to 'packages/aml-backoffice-ui/src/context/config.ts')
-rw-r--r-- | packages/aml-backoffice-ui/src/context/config.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/aml-backoffice-ui/src/context/config.ts b/packages/aml-backoffice-ui/src/context/config.ts index 2866717de..2df7ff40d 100644 --- a/packages/aml-backoffice-ui/src/context/config.ts +++ b/packages/aml-backoffice-ui/src/context/config.ts @@ -35,6 +35,14 @@ const Context = createContext<Type>(undefined as any); export const useExchangeApiContext = (): Type => useContext(Context); +export function ExchangeApiContextTesting({ config, children }: { config: TalerExchangeApi.ExchangeVersionResponse, children?: ComponentChildren; }): VNode { + return h(Context.Provider, { + value: { url: new URL("http://testing"), config, api: null as any }, + children + } + ) +} + export type ConfigResult = undefined | { type: "ok", config: TalerExchangeApi.ExchangeVersionResponse } | { type: "incompatible", result: TalerExchangeApi.ExchangeVersionResponse, supported: string } |