mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Check balance before testing it w/ isZero (#6898)
This commit is contained in:
parent
e81aa6073d
commit
fc3b035aac
@ -47,7 +47,7 @@ class DetectTokensController {
|
||||
}
|
||||
tokensToDetect.forEach((tokenAddress, index) => {
|
||||
const balance = result[index]
|
||||
if (!balance.isZero()) {
|
||||
if (balance && !balance.isZero()) {
|
||||
this._preferences.addToken(tokenAddress, contracts[tokenAddress].symbol, contracts[tokenAddress].decimals)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user