diff options
author | Sebastian <sebasjm@gmail.com> | 2022-10-14 16:12:24 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-10-14 16:12:49 -0300 |
commit | b011c8a32ed478807737b96a9d7fc4e0ff085bdb (patch) | |
tree | f9961a73888b83743431acf134da7f3da22fa4e9 /packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts | |
parent | 6acddd6d70abc568e4b3740f56662691278aa645 (diff) | |
download | wallet-core-b011c8a32ed478807737b96a9d7fc4e0ff085bdb.tar.xz |
terms and privacy on exchange selection
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts index 06d519268..2ea73d310 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/index.ts @@ -21,6 +21,7 @@ import { FeeDescriptionPair, } from "@gnu-taler/taler-util"; import { Loading } from "../../components/Loading.js"; +import { TermsState } from "../../components/TermsOfService/utils.js"; import { HookError } from "../../hooks/useAsyncAsHook.js"; import { State as SelectExchangeState } from "../../hooks/useSelectedExchange.js"; import { ButtonHandler, SelectFieldHandler } from "../../mui/handlers.js"; @@ -31,7 +32,9 @@ import { ComparingView, ErrorLoadingView, NoExchangesView, + PrivacyContentView, ReadyView, + TosContentView, } from "./views.js"; export interface Props { @@ -46,6 +49,8 @@ export type State = | State.LoadingUriError | State.Ready | State.Comparing + | State.ShowingTos + | State.ShowingPrivacy | SelectExchangeState.NoExchange; export namespace State { @@ -63,6 +68,8 @@ export namespace State { exchanges: SelectFieldHandler; selected: ExchangeFullDetails; error: undefined; + onShowTerms: ButtonHandler; + onShowPrivacy: ButtonHandler; } export interface Ready extends BaseInfo { @@ -76,6 +83,16 @@ export namespace State { onReset: ButtonHandler; onSelect: ButtonHandler; } + export interface ShowingTos { + status: "showing-tos"; + exchangeUrl: string; + onClose: ButtonHandler; + } + export interface ShowingPrivacy { + status: "showing-privacy"; + exchangeUrl: string; + onClose: ButtonHandler; + } } const viewMapping: StateViewMap<State> = { @@ -83,6 +100,8 @@ const viewMapping: StateViewMap<State> = { "error-loading": ErrorLoadingView, comparing: ComparingView, "no-exchange": NoExchangesView, + "showing-tos": TosContentView, + "showing-privacy": PrivacyContentView, ready: ReadyView, }; |