aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-06-24 14:42:03 +0800
committerDan Finlay <dan@danfinlay.com>2017-06-24 14:42:03 +0800
commit58e993ff29ec5bc19abeb34d01c71ded60251b7e (patch)
tree70b989d66aaf61865d3043409f4673c85842fda2
parentb04d1de44733065fe6762542eca843a7d9e3d099 (diff)
parent06706f6e1bc721ce8186d694f75b520c1e13124b (diff)
downloadtangerine-wallet-browser-58e993ff29ec5bc19abeb34d01c71ded60251b7e.tar
tangerine-wallet-browser-58e993ff29ec5bc19abeb34d01c71ded60251b7e.tar.gz
tangerine-wallet-browser-58e993ff29ec5bc19abeb34d01c71ded60251b7e.tar.bz2
tangerine-wallet-browser-58e993ff29ec5bc19abeb34d01c71ded60251b7e.tar.lz
tangerine-wallet-browser-58e993ff29ec5bc19abeb34d01c71ded60251b7e.tar.xz
tangerine-wallet-browser-58e993ff29ec5bc19abeb34d01c71ded60251b7e.tar.zst
tangerine-wallet-browser-58e993ff29ec5bc19abeb34d01c71ded60251b7e.zip
Merge branch 'i1616-AddTokenAdding' into i784-SendTokenButton
-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 })
}