Skip to content

Commit

Permalink
refactor: replace missed interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesposito committed Jul 31, 2023
1 parent ab9f74c commit d0f2480
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2941,12 +2941,10 @@ export default class MetamaskController extends EventEmitter {

// seek out the first zero balance
while (lastBalance !== '0x0') {
await keyringController.addNewAccount(primaryKeyring);
const { addedAccountAddress } =
await this.coreKeyringController.addNewAccount(accounts.length);
accounts = await keyringController.getAccounts();
lastBalance = await this.getBalance(
accounts[accounts.length - 1],
ethQuery,
);
lastBalance = await this.getBalance(addedAccountAddress, ethQuery);
}

// remove extra zero balance account potentially created from seeking ahead
Expand Down

0 comments on commit d0f2480

Please sign in to comment.