From 3d7823ded280e40ed8f12c3df71fbaeabd5972b8 Mon Sep 17 00:00:00 2001 From: Michele Esposito Date: Wed, 27 Sep 2023 12:49:59 +0200 Subject: [PATCH] test: fix unlockHardwareWalletAccount addNewAccount mock --- app/scripts/metamask-controller.test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js index f542ad3511d1..ac95c248e897 100644 --- a/app/scripts/metamask-controller.test.js +++ b/app/scripts/metamask-controller.test.js @@ -730,11 +730,12 @@ describe('MetaMaskController', () => { describe('unlockHardwareWalletAccount', () => { const accountToUnlock = 10; beforeEach(async () => { - await metamaskController.createNewVaultAndKeychain('password'); - jest.spyOn(window, 'open').mockReturnValue(); jest - .spyOn(metamaskController.coreKeyringController, 'addNewAccount') + .spyOn( + metamaskController.coreKeyringController, + 'addNewAccountForKeyring', + ) .mockReturnValue('0x123'); jest