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:
parent
bc6b47eb62
commit
76b66c348c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user