Skip to content

Commit

Permalink
bug: can't import accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk committed Jul 7, 2023
1 parent d0a9da8 commit be24610
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/extension/src/background/keyring/keyring.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { v5 as uuid } from "uuid";
import BigNumber from "bignumber.js";

import {
HDWallet,
Expand Down Expand Up @@ -389,7 +390,9 @@ export class KeyRing {

while (index < 999999999 && emptyBalanceCount < 20) {
const { path, info, balances } = await get(index++);
const hasBalance = balances.some(([, value]) => value !== "0");
const hasBalance = balances.some(([, value]) => {
return !new BigNumber(value).isZero();
});

if (hasBalance) {
emptyBalanceCount = 0;
Expand Down

0 comments on commit be24610

Please sign in to comment.