From 859991a40c4a7757d874f9ae6e6db7b76145a3c3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 20 Sep 2022 20:26:41 -0300 Subject: exchange selection for invoices and some fixes --- .../src/wallet/ExchangeSelection/views.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx') diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx index dd85dff46..47554bfcd 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx @@ -31,6 +31,9 @@ import { useTranslationContext } from "../../context/translation.js"; import { Button } from "../../mui/Button.js"; import arrowDown from "../../svg/chevron-down.svg"; import { State } from "./index.js"; +import { + State as SelectExchangeState +} from "../../hooks/useSelectedExchange.js"; const ButtonGroup = styled.div` & > button { @@ -112,11 +115,20 @@ export function ErrorLoadingView({ error }: State.LoadingUriError): VNode { ); } -export function NoExchangesView(state: State.NoExchanges): VNode { + + +export function NoExchangesView({currency}: SelectExchangeState.NoExchange): VNode { const { i18n } = useTranslationContext(); + if (!currency) { + return ( +
+ could not find any exchange +
+ ); + } return (
- no exchanges + could not find any exchange for the currency {currency}
); } -- cgit v1.2.3