mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
Simplify return of existing token in getSymbolAndDecimals
This commit is contained in:
parent
b71dbf52d1
commit
9f9e8789cc
@ -17,10 +17,7 @@ function tokenInfoGetter () {
|
||||
async function getSymbolAndDecimals (tokenAddress, existingTokens = []) {
|
||||
const existingToken = existingTokens.find(({ address }) => tokenAddress === address)
|
||||
if (existingToken) {
|
||||
return {
|
||||
symbol: existingToken.symbol,
|
||||
decimals: existingToken.decimals,
|
||||
}
|
||||
return existingToken
|
||||
}
|
||||
|
||||
let result = []
|
||||
|
Loading…
Reference in New Issue
Block a user