aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/token-list.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/ui/app/components/token-list.js b/ui/app/components/token-list.js
index d2d83de26..ac7ab8309 100644
--- a/ui/app/components/token-list.js
+++ b/ui/app/components/token-list.js
@@ -20,7 +20,7 @@ module.exports = TokenList
inherits(TokenList, Component)
function TokenList () {
this.state = {
- tokens: null,
+ tokens: [],
isLoading: true,
network: null,
}
@@ -164,12 +164,9 @@ TokenList.prototype.componentWillUpdate = function (nextProps) {
}
}
-TokenList.prototype.updateBalances = function (tokenData) {
- const desired = this.props.tokens.map(token => token.address)
- const heldTokens = tokenData.filter(token => {
- const held = token.balance !== '0' && token.string !== '0.000'
- const preferred = desired.includes(normalizeAddress(token.address))
- return held || preferred
+TokenList.prototype.updateBalances = function (tokens) {
+ const heldTokens = tokens.filter(token => {
+ return token.balance !== '0' && token.string !== '0.000'
})
this.setState({ tokens: heldTokens, isLoading: false })
}