message: fix realtime update on url change
diff: @@ -130,7 +130,9 @@ class CurrencyWallet extends Component<any, any> {
  walletAddress,
  } = this.state
  + if (action == 'send') {
  actions.user.getBalances()
  + }
  let {
  match: {
  @@ -217,10 +219,6 @@ class CurrencyWallet extends Component<any, any> {
  this.updateTransactions()
  }
  - if (action !== 'send' && address && prevAddress !== address) {
  - actions.history.setTransactions(address, currency.toLowerCase())
  - }
  -
  if (
  prevProps.location.pathname !== this.props.location.pathname ||
  prevProps.isBalanceFetching !== this.props.isBalanceFetching
  @@ -234,12 +232,23 @@ class CurrencyWallet extends Component<any, any> {
  walletAddress,
  })
  + if (!itemCurrency.length) {
  + itemCurrency = items.filter((item) => {
  + if (
  + (item.balance >= 0)
  + && (
  + (item.currency.toLowerCase() === ticker.toLowerCase())
  + || (item.tokenKey && item.tokenKey.toLowerCase() === ticker.toLowerCase())
  + )
  + ) return true
  + })
  + }
  +
  if (itemCurrency.length) {
  itemCurrency = itemCurrency[0]
  const {
  currency,
  - address,
  contractAddress,
  decimals,
  balance,
  @@ -253,6 +262,7 @@ class CurrencyWallet extends Component<any, any> {
  const hasCachedData = lsDataCache.get(`TxHistory_${getCurrencyKey(currency, true).toLowerCase()}_${address}`)
  if (!this.mounted) return
  + const token = erc20Like.isToken({ name: ticker })
  this.setState(
  {
  @@ -266,13 +276,34 @@ class CurrencyWallet extends Component<any, any> {
  isLoading: false,
  infoAboutCurrency,
  filterValue: address || '',
  - token: erc20Like.isToken({ name: currency }),
  + token,
  },
  () => {
  if (prevProps.location.pathname !== this.props.location.pathname) {
  if (activeCurrency.toUpperCase() !== activeFiat) {
  actions.user.pullActiveCurrency(currency.toLowerCase())
  }
  + if (token && itemCurrency.standard) {
  + actions[itemCurrency.standard].getBalance(currency.toLowerCase(), address).then((balance) => {
  + this.setState({
  + balance,
  + })
  + })
  + } else {
  + const actionName = currency.toLowerCase()
  +
  + address && actions[getCurrencyKey(actionName, false)]
  + .fetchBalance(address)
  + .then((balance) => this.setState({ balance }))
  + }
  +
  + if (action !== 'send') {
  + actions.history.setTransactions(address, ticker.toLowerCase())
  + }
  +
  + if (!address) {
  + actions.core.getSwapHistory()
  + }
  }
  const targetCurrency = getCurrencyKey(currency.toLowerCase(), true)
  const firstUrlPart = tokenKey ? `/token/${tokenKey}` : `/${targetCurrency}`
  