mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-26 16:01:29 +00:00
exclude imported accounts when checking if the last account is empty
This commit is contained in:
parent
de7aafa5c3
commit
813edd442b
@ -115,6 +115,9 @@ const AccountMenu = (props: Props) => {
|
|||||||
if (!selected || !network) return null;
|
if (!selected || !network) return null;
|
||||||
|
|
||||||
const deviceAccounts: Accounts = findDeviceAccounts(accounts, selected, location.state.network);
|
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 selectedAccounts = deviceAccounts.map((account, i) => {
|
||||||
// const url: string = `${baseUrl}/network/${location.state.network}/account/${i}`;
|
// const url: string = `${baseUrl}/network/${location.state.network}/account/${i}`;
|
||||||
@ -187,7 +190,7 @@ const AccountMenu = (props: Props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (discovery && discovery.completed) {
|
if (discovery && discovery.completed) {
|
||||||
const lastAccount = deviceAccounts[deviceAccounts.length - 1];
|
const lastAccount = discoveryAccounts[discoveryAccounts.length - 1];
|
||||||
if (!selected.connected) {
|
if (!selected.connected) {
|
||||||
discoveryStatus = (
|
discoveryStatus = (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
Loading…
Reference in New Issue
Block a user