aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx16
1 files changed, 14 insertions, 2 deletions
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 (
+ <div>
+ <i18n.Translate>could not find any exchange</i18n.Translate>
+ </div>
+ );
+ }
return (
<div>
- <i18n.Translate>no exchanges</i18n.Translate>
+ <i18n.Translate>could not find any exchange for the currency {currency}</i18n.Translate>
</div>
);
}