Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Fixes scanAccounts to take tokenAccounts into account
Browse files Browse the repository at this point in the history
  • Loading branch information
gre committed Jun 21, 2019
1 parent 88e3839 commit 3592706
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libcore/scanAccountsOnDevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ import {
isIterableDerivationMode,
getMandatoryEmptyAccountSkip
} from "../derivation";
import { getWalletName, shouldShowNewAccount } from "../account";
import {
getWalletName,
shouldShowNewAccount,
isAccountEmpty
} from "../account";
import type { Account, CryptoCurrency, DerivationMode } from "../types";
import { open } from "../hw";
import getAddress from "../hw/getAddress";
Expand Down Expand Up @@ -77,7 +81,7 @@ async function scanNextAccount(props: {

if (isUnsubscribed()) return;

const isEmpty = account.operations.length === 0;
const isEmpty = isAccountEmpty(account);
const shouldSkip =
(isEmpty && !showNewAccount) ||
!derivationModeSupportsIndex(derivationMode, accountIndex);
Expand Down

0 comments on commit 3592706

Please sign in to comment.