mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-23 22:41:06 +00:00
disable sign n verify tab for imported accounts
This commit is contained in:
parent
4fc7f5323e
commit
4582538917
@ -90,9 +90,11 @@ class TopNavigationAccount extends React.PureComponent<Props, LocalState> {
|
|||||||
render() {
|
render() {
|
||||||
const { state, pathname } = this.props.router.location;
|
const { state, pathname } = this.props.router.location;
|
||||||
if (!state) return null;
|
if (!state) return null;
|
||||||
const { network } = this.props.selectedAccount;
|
const { network, account } = this.props.selectedAccount;
|
||||||
if (!network) return null;
|
if (!network) return null;
|
||||||
|
|
||||||
|
const isAccountImported = account && account.imported;
|
||||||
|
|
||||||
const basePath = `/device/${state.device}/network/${state.network}/account/${
|
const basePath = `/device/${state.device}/network/${state.network}/account/${
|
||||||
state.account
|
state.account
|
||||||
}`;
|
}`;
|
||||||
@ -108,7 +110,7 @@ class TopNavigationAccount extends React.PureComponent<Props, LocalState> {
|
|||||||
<StyledNavLink to={`${basePath}/send`}>
|
<StyledNavLink to={`${basePath}/send`}>
|
||||||
<FormattedMessage {...l10nMessages.TR_NAV_SEND} />
|
<FormattedMessage {...l10nMessages.TR_NAV_SEND} />
|
||||||
</StyledNavLink>
|
</StyledNavLink>
|
||||||
{network.type === 'ethereum' && (
|
{network.type === 'ethereum' && !isAccountImported && (
|
||||||
<StyledNavLink to={`${basePath}/signverify`}>
|
<StyledNavLink to={`${basePath}/signverify`}>
|
||||||
<FormattedMessage {...l10nMessages.TR_NAV_SIGN_AND_VERIFY} />
|
<FormattedMessage {...l10nMessages.TR_NAV_SIGN_AND_VERIFY} />
|
||||||
</StyledNavLink>
|
</StyledNavLink>
|
||||||
|
Loading…
Reference in New Issue
Block a user