From e40ccf1811f9d86773a2bb1ef9cb8c5d75df6a3e Mon Sep 17 00:00:00 2001 From: meriadec Date: Sun, 29 Apr 2018 18:08:27 +0200 Subject: [PATCH] Fix AddAccount modal SelectCurrency component --- src/components/SelectCurrency/index.js | 5 +++-- .../modals/AddAccount/01-step-currency.js | 22 ++++--------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/components/SelectCurrency/index.js b/src/components/SelectCurrency/index.js index 0ceb6770..249b0cb5 100644 --- a/src/components/SelectCurrency/index.js +++ b/src/components/SelectCurrency/index.js @@ -32,10 +32,11 @@ const currencies = listCryptoCurrencies().sort((a, b) => a.name.localeCompare(b. type Props = { onChange: Function, value?: CryptoCurrency, + placeholder: string, t: T, } -const SelectCurrency = ({ onChange, value, t, ...props }: Props) => ( +const SelectCurrency = ({ onChange, value, t, placeholder, ...props }: Props) => ( props.onChangeCurrency(item.data)} - renderSelected={item => item.name} - items={currencies} - value={ - props.currency ? currencies.find(c => c.key === get(props, 'currency.coinType')) : null - } + onChange={props.onChangeCurrency} + value={props.currency} /> )