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