Merge pull request #4295 from MetaMask/kumavis-patch-3

ui - token-util - warn via loglevel on token lookup failure
This commit is contained in:
Frankie 2018-05-21 15:06:18 -07:00 committed by GitHub
commit 5e67951c1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
const log = require('loglevel')
const util = require('./util')
function tokenInfoGetter () {
@ -29,7 +30,7 @@ async function getSymbolAndDecimals (tokenAddress, existingTokens = []) {
token.decimals(),
])
} catch (err) {
console.log(`symbol() and decimal() calls for token at address ${tokenAddress} resulted in error:`, err)
log.warn(`symbol() and decimal() calls for token at address ${tokenAddress} resulted in error:`, err)
}
const [ symbol = [], decimals = [] ] = result