File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class KeyringController extends EventEmitter {
88
88
89
89
await this . createFirstKeyTree ( ) ;
90
90
this . setUnlocked ( ) ;
91
- this . fullUpdate ( ) ;
91
+ return this . fullUpdate ( ) ;
92
92
}
93
93
94
94
/**
@@ -182,7 +182,7 @@ class KeyringController extends EventEmitter {
182
182
this . keyrings = await this . unlockKeyrings ( password ) ;
183
183
184
184
this . setUnlocked ( ) ;
185
- this . fullUpdate ( ) ;
185
+ return this . fullUpdate ( ) ;
186
186
}
187
187
188
188
/**
@@ -203,7 +203,7 @@ class KeyringController extends EventEmitter {
203
203
encryptionSalt ,
204
204
) ;
205
205
this . setUnlocked ( ) ;
206
- this . fullUpdate ( ) ;
206
+ return this . fullUpdate ( ) ;
207
207
}
208
208
209
209
/**
@@ -330,7 +330,7 @@ class KeyringController extends EventEmitter {
330
330
} ) ;
331
331
332
332
await this . persistAllKeyrings ( ) ;
333
- this . fullUpdate ( ) ;
333
+ return this . fullUpdate ( ) ;
334
334
}
335
335
336
336
/**
@@ -379,7 +379,7 @@ class KeyringController extends EventEmitter {
379
379
}
380
380
381
381
await this . persistAllKeyrings ( ) ;
382
- this . fullUpdate ( ) ;
382
+ return this . fullUpdate ( ) ;
383
383
}
384
384
385
385
//
Original file line number Diff line number Diff line change @@ -99,10 +99,12 @@ describe('KeyringController', function () {
99
99
keyringController . store . updateState ( { vault : null } ) ;
100
100
assert ( ! keyringController . store . getState ( ) . vault , 'no previous vault' ) ;
101
101
102
- await keyringController . createNewVaultAndKeychain ( password ) ;
102
+ const newVault = await keyringController . createNewVaultAndKeychain (
103
+ password ,
104
+ ) ;
103
105
const { vault } = keyringController . store . getState ( ) ;
104
- // eslint-disable-next-line jest/no-restricted-matchers
105
- expect ( vault ) . toBeTruthy ( ) ;
106
+ expect ( vault ) . toStrictEqual ( expect . stringMatching ( '.+' ) ) ;
107
+ expect ( typeof newVault ) . toBe ( 'object' ) ;
106
108
} ) ;
107
109
108
110
it ( 'should unlock the vault' , async function ( ) {
You can’t perform that action at this time.
0 commit comments