From 8eee38d55936c194637ecead302dde69ec0b9897 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 5 Apr 2023 12:06:24 -0300
Subject: fix #7791

---
 .../src/wallet/ExchangeSelection/views.tsx         | 43 ++++++++++++----------
 1 file changed, 24 insertions(+), 19 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 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>
   );
 }
 
-- 
cgit v1.2.3

