@@ -3217,7 +3217,7 @@ describe('KeyringController', () => {
32173217 describe ( 'atomic operations' , ( ) => {
32183218 describe ( 'addNewKeyring' , ( ) => {
32193219 it ( 'should rollback the controller keyrings if the keyring creation fails' , async ( ) => {
3220- const mockAddress = '0x1234 ' ;
3220+ const mockAddress = '0x4584d2B4905087A100420AFfCe1b2d73fC69B8E4 ' ;
32213221 stubKeyringClassWithAccount ( MockKeyring , mockAddress ) ;
32223222 // Mocking the serialize method to throw an error will
32233223 // halt the controller everytime it tries to persist the keyring,
@@ -3234,12 +3234,11 @@ describe('KeyringController', () => {
32343234 controller . addNewKeyring ( MockKeyring . type ) ,
32353235 ) . rejects . toThrow ( 'You will never be able to persist me!' ) ;
32363236
3237- expect ( controller . state . keyrings ) . toHaveLength ( 1 ) ;
3238- // getAccounts calls each keyring to get its accounts
3239- // resulting in an additional '0x1234' account being added
3240- // in case of test failure
3241- expect ( await controller . getAccounts ( ) ) . toStrictEqual (
3242- initialState . keyrings [ 0 ] . accounts ,
3237+ expect ( controller . state ) . toStrictEqual ( initialState ) ;
3238+ await expect (
3239+ controller . exportAccount ( password , mockAddress ) ,
3240+ ) . rejects . toThrow (
3241+ 'KeyringController - No keyring found. Error info: There are keyrings, but none match the address' ,
32433242 ) ;
32443243 } ,
32453244 ) ;
0 commit comments