diff options
author | Sebastian <sebasjm@gmail.com> | 2024-04-26 14:31:48 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-04-26 14:31:48 -0300 |
commit | a1c5917e626856f2abd9dbe6ddaa71c1458334c6 (patch) | |
tree | d7456b0b27bda5b4b04b78384fd67d3d5f8db379 /packages/aml-backoffice-ui/src/stories.tsx | |
parent | 6837a9dc6f677babe798bc94c0baa1f11c0edb55 (diff) | |
download | wallet-core-a1c5917e626856f2abd9dbe6ddaa71c1458334c6.tar.xz |
update code to match others
Diffstat (limited to 'packages/aml-backoffice-ui/src/stories.tsx')
-rw-r--r-- | packages/aml-backoffice-ui/src/stories.tsx | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/packages/aml-backoffice-ui/src/stories.tsx b/packages/aml-backoffice-ui/src/stories.tsx index 017a31ffa..a66396696 100644 --- a/packages/aml-backoffice-ui/src/stories.tsx +++ b/packages/aml-backoffice-ui/src/stories.tsx @@ -1,6 +1,6 @@ /* This file is part of GNU Taler - (C) 2022 Taler Systems S.A. + (C) 2022-2024 Taler Systems S.A. GNU Taler is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -22,10 +22,14 @@ import { strings } from "./i18n/strings.js"; import * as pages from "./pages/index.stories.js"; -import { renderStories } from "@gnu-taler/web-util/browser"; +import { + ExchangeApiProviderTesting, + ExchangeContextType, + renderStories, +} from "@gnu-taler/web-util/browser"; +import { TalerExchangeApi } from "@gnu-taler/taler-util"; import { ComponentChildren, FunctionComponent, VNode, h } from "preact"; -import { ExchangeApiContextTesting } from "./context/config.js"; import "./scss/main.css"; function main(): void { @@ -40,24 +44,33 @@ function main(): void { function getWrapperForGroup(): FunctionComponent { return function All({ children }: { children?: ComponentChildren }): VNode { + const config: TalerExchangeApi.ExchangeVersionResponse = { + currency: "ARS", + currency_specification: { + alt_unit_names: {}, + name: "ARS", + num_fractional_input_digits: 2, + num_fractional_normal_digits: 2, + num_fractional_trailing_zero_digits: 2, + }, + name: "taler-exchange", + supported_kyc_requirements: [], + version: "asd", + }; + const value: ExchangeContextType = { + cancelRequest: () => null, + config, + url: new URL("/", "http://locahost"), + hints: [], + lib: { + exchange: undefined!, //FIXME: mock + }, + onActivity: () => null!, + }; return ( - <ExchangeApiContextTesting - config={{ - currency: "ARS", - currency_specification: { - alt_unit_names: {}, - name: "ARS", - num_fractional_input_digits: 2, - num_fractional_normal_digits: 2, - num_fractional_trailing_zero_digits: 2, - }, - name: "taler-exchange", - supported_kyc_requirements: [], - version: "asd", - }} - > + <ExchangeApiProviderTesting value={value}> {children} - </ExchangeApiContextTesting> + </ExchangeApiProviderTesting> ); }; } |