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.tsx43
1 files changed, 24 insertions, 19 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx
index fd5c0cfe3..242a8e823 100644
--- a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx
@@ -141,28 +141,33 @@ export function TosContentView({
}
export function NoExchangesView({
+ defaultExchange,
currency,
-}: SelectExchangeState.NoExchange): VNode {
+}: SelectExchangeState.NoExchangeFound): VNode {
const { i18n } = useTranslationContext();
- if (!currency) {
- return (
- <AlertView
- alert={{
- type: "warning",
- message: i18n.str`Could not find any exchange `,
- description: i18n.str`You are trying to withdraw coins but there is no exchange and the bank didn't suggested one.`,
- }}
- />
- );
- }
return (
- <AlertView
- alert={{
- type: "warning",
- message: i18n.str`Could not find any exchange `,
- description: i18n.str`You are trying to withdraw coins for the currency ${currency} but there is no exchange registered in this wallet and the bank didn't suggested one.`,
- }}
- />
+ <Fragment>
+ <p>
+ <AlertView
+ alert={{
+ type: "error",
+ message: i18n.str`There is no exchange available for currency ${currency}`,
+ description: i18n.str`You can add more exchanges from the settings.`,
+ cause: undefined,
+ context: undefined,
+ }}
+ />
+ </p>
+ {defaultExchange && (
+ <AlertView
+ alert={{
+ type: "warning",
+ message: i18n.str`Exchange ${defaultExchange} is not available`,
+ description: i18n.str`Exchange status can view accessed from the settings.`,
+ }}
+ />
+ )}
+ </Fragment>
);
}