This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,7 @@ class WalletAction {
298298 this . _nav . goWait ( ) ;
299299 observe ( this . _store , 'lndReady' , ( ) => this . _nav . goHome ( ) ) ;
300300 } catch ( err ) {
301+ this . setPassword ( { password : '' } ) ;
301302 this . _notification . display ( { type : 'error' , msg : 'Invalid password' } ) ;
302303 }
303304 }
Original file line number Diff line number Diff line change @@ -354,13 +354,16 @@ describe('Action Wallet Unit Tests', () => {
354354 expect ( nav . goHome , 'was called once' ) ;
355355 } ) ;
356356
357- it ( 'should display error notification on failure' , async ( ) => {
357+ it ( 'should display error notification on failure and clear password' , async ( ) => {
358+ wallet . setPassword ( 'not-empty' ) ;
359+ expect ( store . wallet . password , 'not to be' , '' ) ;
358360 grpc . sendUnlockerCommand
359361 . withArgs ( 'UnlockWallet' )
360362 . rejects ( new Error ( 'Boom!' ) ) ;
361363 await wallet . unlockWallet ( { walletPassword : 'baz' } ) ;
362364 expect ( notification . display , 'was called once' ) ;
363365 expect ( nav . goWait , 'was not called' ) ;
366+ expect ( store . wallet . password , 'to be' , '' ) ;
364367 } ) ;
365368 } ) ;
366369
You can’t perform that action at this time.
0 commit comments