fix token balance selector

This commit is contained in:
mmv 2019-04-16 15:15:56 +04:00
parent 76b41a4cbb
commit 4c1197a3b5
1 changed files with 2 additions and 2 deletions

View File

@ -75,10 +75,10 @@ const extendedSafeTokensSelector: Selector<GlobalState, RouterProps, List<Token>
const extendedTokens = Map().withMutations((map) => { const extendedTokens = Map().withMutations((map) => {
safeTokens.forEach((tokenAddress: string) => { safeTokens.forEach((tokenAddress: string) => {
const baseToken = tokensList.get(tokenAddress) const baseToken = tokensList.get(tokenAddress)
const tokenBalance = balances.find(tknBalance => tknBalance.address === tokenAddress) || '0' const tokenBalance = balances.find(tknBalance => tknBalance.address === tokenAddress)
if (baseToken) { if (baseToken) {
map.set(tokenAddress, baseToken.set('balance', tokenBalance)) map.set(tokenAddress, baseToken.set('balance', tokenBalance ? tokenBalance.balance : '0'))
} }
}) })