diff options
author | Sebastian <sebasjm@gmail.com> | 2022-09-16 14:29:35 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-09-16 14:29:35 -0300 |
commit | 6ddb2de84245ae3914c92b2b2eb7399e7f04500e (patch) | |
tree | 425cc377daf053e5283bee6986f6f437f25d7584 /packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts | |
parent | 860f10e6f004668d3109b5a1d96ddb2b26ddc2f5 (diff) | |
download | wallet-core-6ddb2de84245ae3914c92b2b2eb7399e7f04500e.tar.xz |
pretty
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts index 16ab7ab16..3b2708eff 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts @@ -14,16 +14,25 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { FeeDescription, FeeDescriptionPair, AbsoluteTime, ExchangeFullDetails, OperationMap } from "@gnu-taler/taler-util"; +import { + FeeDescription, + FeeDescriptionPair, + AbsoluteTime, + ExchangeFullDetails, + OperationMap, +} from "@gnu-taler/taler-util"; import { Loading } from "../../components/Loading.js"; import { HookError } from "../../hooks/useAsyncAsHook.js"; import { ButtonHandler, SelectFieldHandler } from "../../mui/handlers.js"; import { compose, StateViewMap } from "../../utils/index.js"; import * as wxApi from "../../wxApi.js"; import { useComponentState } from "./state.js"; -import { ComparingView, LoadingUriView, NoExchangesView, ReadyView } from "./views.js"; - - +import { + ComparingView, + LoadingUriView, + NoExchangesView, + ReadyView, +} from "./views.js"; export interface Props { currency?: string; @@ -39,7 +48,6 @@ export type State = | State.NoExchanges; export namespace State { - export interface Loading { status: "loading"; error: undefined; @@ -75,13 +83,16 @@ export namespace State { } } - const viewMapping: StateViewMap<State> = { loading: Loading, "loading-uri": LoadingUriView, - "comparing": ComparingView, + comparing: ComparingView, "no-exchanges": NoExchangesView, - "ready": ReadyView, + ready: ReadyView, }; -export const ExchangeSelectionPage = compose("ExchangeSelectionPage", (p: Props) => useComponentState(p, wxApi), viewMapping) +export const ExchangeSelectionPage = compose( + "ExchangeSelectionPage", + (p: Props) => useComponentState(p, wxApi), + viewMapping, +); |