diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx index aa8b58707..d732e60e2 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx @@ -39,8 +39,7 @@ export function SuccessView(state: State.Success): VNode { const { i18n } = useTranslationContext(); const currentTosVersionIsAccepted = state.currentExchange.tosStatus === ExchangeTosStatus.Accepted; - const altCurrencies = state.accounts.filter(a => !!a.currencySpecification).map(a => a.currencySpecification!.name) - return ( + return ( <Fragment> <section style={{ textAlign: "left" }}> <Part @@ -67,25 +66,27 @@ export function SuccessView(state: State.Success): VNode { kind="neutral" big /> - <p> - This exchange allows alternative currency - </p> - <p> - <Button - variant="outlined" - > - EUR - </Button> - <Button - variant="outlined" - > - ARS - </Button> - </p> + {state.chooseCurrencies.length > 0 ? + <Fragment> + <p> + {state.chooseCurrencies.map(currency => { + return <Button variant={currency === state.selectedCurrency ? "contained" : "outlined"} + onClick={async () => { + state.changeCurrency(currency) + }} + > + {currency} + </Button> + })} + </p> + </Fragment> + : <Fragment />} + <Part title={i18n.str`Details`} text={ <WithdrawDetails + conversion={state.conversionInfo?.amount} amount={getAmountWithFee( state.toBeReceived, state.chosenAmount, |