diff options
| author | Sebastian <sebasjm@gmail.com> | 2023-04-05 12:06:24 -0300 |
|---|---|---|
| committer | Sebastian <sebasjm@gmail.com> | 2023-04-05 12:06:24 -0300 |
| commit | 8eee38d55936c194637ecead302dde69ec0b9897 (patch) | |
| tree | fc87a818fa586152e5f6ad1dfb29e917abe959f7 /packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx | |
| parent | d5c5c7463e5210916822c8030bb59c7b0f3ccc1c (diff) | |
fix #7791
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx')
| -rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx | 43 |
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> ); } |
