diff options
author | Sebastian <sebasjm@gmail.com> | 2022-09-20 16:04:51 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-09-20 16:05:59 -0300 |
commit | 52ec740c825d4e94fd59ef0a5cd8e8b73f4dfc06 (patch) | |
tree | dd65f9852005097c2cd8975b14ccbd198bef57e8 /packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts | |
parent | a5525eab1e96d5b08fbb6442275b1e92f7f8d806 (diff) | |
download | wallet-core-52ec740c825d4e94fd59ef0a5cd8e8b73f4dfc06.tar.xz |
new compose feature: sub-states
implemented in withdraw page, WIP
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts index 3b2708eff..2834028c6 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts @@ -20,6 +20,7 @@ import { AbsoluteTime, ExchangeFullDetails, OperationMap, + ExchangeListItem, } from "@gnu-taler/taler-util"; import { Loading } from "../../components/Loading.js"; import { HookError } from "../../hooks/useAsyncAsHook.js"; @@ -29,13 +30,14 @@ import * as wxApi from "../../wxApi.js"; import { useComponentState } from "./state.js"; import { ComparingView, - LoadingUriView, + ErrorLoadingView, NoExchangesView, ReadyView, } from "./views.js"; export interface Props { - currency?: string; + list: ExchangeListItem[], + currentExchange: string, onCancel: () => Promise<void>; onSelection: (exchange: string) => Promise<void>; } @@ -54,7 +56,7 @@ export namespace State { } export interface LoadingUriError { - status: "loading-uri"; + status: "error-loading"; error: HookError; } @@ -85,7 +87,7 @@ export namespace State { const viewMapping: StateViewMap<State> = { loading: Loading, - "loading-uri": LoadingUriView, + "error-loading": ErrorLoadingView, comparing: ComparingView, "no-exchanges": NoExchangesView, ready: ReadyView, |