Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

[Hotfix] Fix empty row bug in balances #1646

Merged
merged 2 commits into from
Dec 1, 2020

Conversation

W3stside
Copy link
Contributor

adds filterAndFillTokenDetails fn to fill tokens that do not have pre-filled data when pulled from localStorage

Why? fixes empty row bug in balances

Problem was:
Screenshot from 2020-11-30 16-22-01

@ghost
Copy link

ghost commented Nov 30, 2020

Travis automatic deployment:

Copy link
Contributor

@Velenir Velenir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Works for me 👍

Comment on lines 293 to 301
const tokensWithDetails = tokensConfig.reduce<TokenDetails[]>((acc, token) => {
if (!token.name || !token.symbol) {
tokensWithNoDetails.push(token)
return acc
}

acc.push(token)
return acc
}, [])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure there's much advantage to reduce over a for loop if you do side effects (tokensWithNoDetails.push(token)) anyways

src/services/factories/tokenList.ts Outdated Show resolved Hide resolved
src/services/factories/tokenList.ts Outdated Show resolved Hide resolved
@W3stside W3stside merged commit 34a9d3c into master Dec 1, 2020
@W3stside W3stside deleted the hotfix_1.6.7/fix-empty-token-rows branch December 1, 2020 10:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants