mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix token list when balance is zero (#8250)
The token list would be stuck on "Loading" when there was at least one token, but the balance of all tokens was zero. This bug was only present on `develop`, and has not affected any published version of the extension. This was introduced in #8223, which removed what at the time seemed to be an unnecessary update step. It turns out that the step was required as a workaround to this bug with the token tracker. The bug was fixed in https://github.com/MetaMask/eth-token-tracker/pull/33 and published in v2.0.0 of `@metamask/eth-token-tracker`.
This commit is contained in:
parent
a761b9e15d
commit
4b59d6099a
@ -72,6 +72,7 @@
|
||||
"@download/blockies": "^1.0.3",
|
||||
"@material-ui/core": "1.0.0",
|
||||
"@metamask/eth-ledger-bridge-keyring": "^0.2.6",
|
||||
"@metamask/eth-token-tracker": "^2.0.0",
|
||||
"@sentry/browser": "^5.11.1",
|
||||
"@sentry/integrations": "^5.11.1",
|
||||
"@zxing/library": "^0.8.0",
|
||||
@ -103,7 +104,6 @@
|
||||
"eth-phishing-detect": "^1.1.4",
|
||||
"eth-query": "^2.1.2",
|
||||
"eth-sig-util": "^2.3.0",
|
||||
"eth-token-tracker": "^1.1.10",
|
||||
"eth-trezor-keyring": "^0.4.0",
|
||||
"ethereum-ens-network-map": "^1.0.2",
|
||||
"ethereumjs-abi": "^0.6.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import TokenTracker from 'eth-token-tracker'
|
||||
import TokenTracker from '@metamask/eth-token-tracker'
|
||||
import { isEqual } from 'lodash'
|
||||
import contracts from 'eth-contract-metadata'
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { shallow } from 'enzyme'
|
||||
import withTokenTracker from '../with-token-tracker.component'
|
||||
import TokenBalance from '../../../../components/ui/token-balance/token-balance.component'
|
||||
// import sinon from 'sinon'
|
||||
import TokenTracker from 'eth-token-tracker'
|
||||
import TokenTracker from '@metamask/eth-token-tracker'
|
||||
|
||||
const { createTestProviderTools } = require('../../../../../../test/stub/provider')
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import TokenTracker from 'eth-token-tracker'
|
||||
import TokenTracker from '@metamask/eth-token-tracker'
|
||||
|
||||
export default function withTokenTracker (WrappedComponent) {
|
||||
return class TokenTrackerWrappedComponent extends Component {
|
||||
|
45
yarn.lock
45
yarn.lock
@ -1860,6 +1860,19 @@
|
||||
events "^2.0.0"
|
||||
hdkey "0.8.0"
|
||||
|
||||
"@metamask/eth-token-tracker@^2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@metamask/eth-token-tracker/-/eth-token-tracker-2.0.0.tgz#a94a99bd3160ee85ec5feace29fbb02f80f5c826"
|
||||
integrity sha512-PTiUbx7JulDREswWmebRyIj2wNUV8eLTZWGEA2Duca8IGVP1r8q+kb163tXT4FNNAGR+6JoVvkJ8SpIN+XoiNQ==
|
||||
dependencies:
|
||||
deep-equal "^1.1.0"
|
||||
eth-block-tracker "^4.4.2"
|
||||
ethjs "^0.3.6"
|
||||
ethjs-contract "^0.2.1"
|
||||
ethjs-query "^0.3.7"
|
||||
human-standard-token-abi "^1.0.2"
|
||||
safe-event-emitter "^1.0.1"
|
||||
|
||||
"@metamask/forwarder@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@metamask/forwarder/-/forwarder-1.1.0.tgz#13829d8244bbf19ea658c0b20d21a77b67de0bdd"
|
||||
@ -8445,6 +8458,18 @@ deep-equal@^1.0.0, deep-equal@^1.0.1, deep-equal@~1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
|
||||
integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=
|
||||
|
||||
deep-equal@^1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a"
|
||||
integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==
|
||||
dependencies:
|
||||
is-arguments "^1.0.4"
|
||||
is-date-object "^1.0.1"
|
||||
is-regex "^1.0.4"
|
||||
object-is "^1.0.1"
|
||||
object-keys "^1.1.1"
|
||||
regexp.prototype.flags "^1.2.0"
|
||||
|
||||
deep-extend@^0.5.0:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f"
|
||||
@ -10498,19 +10523,6 @@ eth-simple-keyring@^3.5.0:
|
||||
events "^1.1.1"
|
||||
xtend "^4.0.1"
|
||||
|
||||
eth-token-tracker@^1.1.10:
|
||||
version "1.1.10"
|
||||
resolved "https://registry.yarnpkg.com/eth-token-tracker/-/eth-token-tracker-1.1.10.tgz#3899a33cc442c0405e3923e71e0eff530bd1258b"
|
||||
integrity sha512-rmY/hoTK4I1ta0bEp3xeLKPxbFDcDgjWBGXKOrdCLmSNY8zKsymQzrfUF01b6olahxxs7hAf++f52Vk+TfOlzg==
|
||||
dependencies:
|
||||
deep-equal "^1.0.1"
|
||||
eth-block-tracker "^4.4.2"
|
||||
ethjs "^0.3.6"
|
||||
ethjs-contract "^0.2.1"
|
||||
ethjs-query "^0.3.7"
|
||||
human-standard-token-abi "^1.0.2"
|
||||
safe-event-emitter "^1.0.1"
|
||||
|
||||
eth-trezor-keyring@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/eth-trezor-keyring/-/eth-trezor-keyring-0.4.0.tgz#f59c210f95aaf3d7321ae69d2b87a3b8db96a828"
|
||||
@ -15129,6 +15141,11 @@ is-alphanumerical@^1.0.0:
|
||||
is-alphabetical "^1.0.0"
|
||||
is-decimal "^1.0.0"
|
||||
|
||||
is-arguments@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3"
|
||||
integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==
|
||||
|
||||
is-arrayish@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
||||
@ -23931,7 +23948,7 @@ regexp-tree@^0.1.6:
|
||||
resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.10.tgz#d837816a039c7af8a8d64d7a7c3cf6a1d93450bc"
|
||||
integrity sha512-K1qVSbcedffwuIslMwpe6vGlj+ZXRnGkvjAtFHfDZZZuEdA/h0dxljAPu9vhUo6Rrx2U2AwJ+nSQ6hK+lrP5MQ==
|
||||
|
||||
regexp.prototype.flags@^1.3.0:
|
||||
regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75"
|
||||
integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==
|
||||
|
Loading…
Reference in New Issue
Block a user