1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-27 09:28:19 +00:00

Fixed browser select crash

This commit is contained in:
Vladimir Volek 2018-11-06 16:13:07 +01:00
parent bc6b47eb62
commit 76b66c348c

View File

@ -123,10 +123,12 @@ const AccountSummary = (props: Props) => {
loadingMessage={() => 'Loading...'}
noOptionsMessage={() => 'Token not found'}
onChange={(token) => {
if (token.name) {
const isAdded = tokens.find(t => t.symbol === token.symbol);
if (!isAdded) {
props.addToken(token, account);
}
}
}}
loadOptions={input => props.loadTokens(input, account.network)}
formatOptionLabel={(option) => {
@ -140,7 +142,6 @@ const AccountSummary = (props: Props) => {
getOptionValue={option => option.symbol}
/>
</AsyncSelectWrapper>
<AddedTokensWrapper>
{tokens.map(token => (
<AddedToken