diff --git a/src/bridge/EthereumJSBridge.js b/src/bridge/EthereumJSBridge.js index 12dccc6e..003a180f 100644 --- a/src/bridge/EthereumJSBridge.js +++ b/src/bridge/EthereumJSBridge.js @@ -248,7 +248,9 @@ const EthereumBridge: WalletBridge = { } for (let i = 0; i < 50; i++) { const api = apiForCurrency(account.currency) - const { block } = txs[txs.length - 1] + const last = txs[txs.length - 1] + if (!last) break + const { block } = last if (!block) break const next = await api.getTransactions(account.freshAddress, block.hash) if (next.txs.length === 0) break diff --git a/src/components/AccountPage/AccountHeaderActions.js b/src/components/AccountPage/AccountHeaderActions.js index 12b26a90..9ae4abb7 100644 --- a/src/components/AccountPage/AccountHeaderActions.js +++ b/src/components/AccountPage/AccountHeaderActions.js @@ -7,6 +7,7 @@ import { translate } from 'react-i18next' import styled from 'styled-components' import type { Account } from '@ledgerhq/live-common/lib/types' import Tooltip from 'components/base/Tooltip' +import isAccountEmpty from 'helpers/isAccountEmpty' import { MODAL_SEND, MODAL_RECEIVE, MODAL_SETTINGS_ACCOUNT } from 'config/constants' @@ -61,7 +62,7 @@ class AccountHeaderActions extends PureComponent { const { account, openModal, t } = this.props return ( - {account.operations.length > 0 || !account.balance.isZero() ? ( + {!isAccountEmpty(account) ? (