1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-12 17:10:56 +00:00

exclude imported accounts when checking if the last account is empty

This commit is contained in:
slowbackspace 2019-04-09 16:33:50 +02:00
parent de7aafa5c3
commit 813edd442b

View File

@ -115,6 +115,9 @@ const AccountMenu = (props: Props) => {
if (!selected || !network) return null;
const deviceAccounts: Accounts = findDeviceAccounts(accounts, selected, location.state.network);
const discoveryAccounts: Accounts = deviceAccounts.filter(
account => account.imported === false
);
const selectedAccounts = deviceAccounts.map((account, i) => {
// const url: string = `${baseUrl}/network/${location.state.network}/account/${i}`;
@ -187,7 +190,7 @@ const AccountMenu = (props: Props) => {
);
if (discovery && discovery.completed) {
const lastAccount = deviceAccounts[deviceAccounts.length - 1];
const lastAccount = discoveryAccounts[discoveryAccounts.length - 1];
if (!selected.connected) {
discoveryStatus = (
<Tooltip