Skip to content

Commit

Permalink
Merge branch 'dev' into ipc
Browse files Browse the repository at this point in the history
  • Loading branch information
kewde committed Jan 29, 2018
2 parents f6b46d7 + cb4624d commit 7a435bc
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/app/modals/createwallet/createwallet.component.ts
Expand Up @@ -48,6 +48,7 @@ export class CreateWalletComponent implements OnDestroy {
// Used for verification
private wordsVerification: string[];
private validating: boolean = false;
private passcount: number = 0;

errorString: string = '';
private destroyed: boolean = false;
Expand Down Expand Up @@ -104,6 +105,8 @@ export class CreateWalletComponent implements OnDestroy {

/* Recovery password entered */
if (this.step === 2) {
this.password = '';
this.passwordVerify = '';
this.passwordElement.sendPassword();
this.passwordElementVerify.sendPassword();
return;
Expand Down Expand Up @@ -133,8 +136,8 @@ export class CreateWalletComponent implements OnDestroy {
if (this.isRestore) {
this.step = 4;
}
this.password = undefined;
this.passwordVerify = undefined;
this.password = '';
this.passwordVerify = '';
break;
case 3:
this._passphraseService.generateMnemonic(
Expand Down Expand Up @@ -238,11 +241,12 @@ export class CreateWalletComponent implements OnDestroy {

/** Triggered when the password is emitted from PasswordComponent */
passwordFromEmitter(pass: IPassword, verify?: boolean) {
this[verify ? 'passwordVerify' : 'password'] = pass.password;
this.passcount++;
this[verify ? 'passwordVerify' : 'password'] = (pass.password || '');
this.log.d(`passwordFromEmitter: ${this.password} ${verify}`);
if (!!this[verify ? 'password' : 'passwordVerify']
|| this.password === '' && this.passwordVerify === ''
|| this.password === undefined && this.passwordVerify === undefined) {

// Make sure we got both passwords back...
if (this.passcount % 2 === 0) {
this.verifyPasswords();
}
}
Expand All @@ -266,7 +270,8 @@ export class CreateWalletComponent implements OnDestroy {
this.step++;
this.doStep();
}
this.passwordVerify = undefined;
this.passwordVerify = ''
this.password = '';
}

/** Triggered when the password is emitted from PassphraseComponent */
Expand Down

0 comments on commit 7a435bc

Please sign in to comment.