1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-26 17:08:07 +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,9 +123,11 @@ const AccountSummary = (props: Props) => {
loadingMessage={() => 'Loading...'}
noOptionsMessage={() => 'Token not found'}
onChange={(token) => {
const isAdded = tokens.find(t => t.symbol === token.symbol);
if (!isAdded) {
props.addToken(token, account);
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)}
@ -140,7 +142,6 @@ const AccountSummary = (props: Props) => {
getOptionValue={option => option.symbol}
/>
</AsyncSelectWrapper>
<AddedTokensWrapper>
{tokens.map(token => (
<AddedToken