Skip to content

Commit 26cae95

Browse files
authored
small bug fix (#1)
1 parent 0c7c6cf commit 26cae95

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/app/components/mnemonic-import/mnemonic-import.component.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,19 @@ export class MnemonicImportComponent implements OnInit {
4545
if (this.tge) {
4646
this.passphrase = this.email + this.password;
4747
}
48-
const pkh = this.operationService.seed2keyPair(this.operationService.mnemonic2seed(this.mnemonic, this.passphrase)).pkh;
4948
if (!this.operationService.validMnemonic(this.mnemonic)) {
5049
this.messageService.addError('Invalid mnemonic!', 10);
51-
} else if (this.pkh && pkh !== this.pkh) {
52-
if (this.tge) {
53-
this.messageService.addError('Invalid email or password!', 5);
50+
} else {
51+
const pkh = this.operationService.seed2keyPair(this.operationService.mnemonic2seed(this.mnemonic, this.passphrase)).pkh;
52+
if (this.pkh && pkh !== this.pkh) {
53+
if (this.tge) {
54+
this.messageService.addError('Invalid email or password!', 5);
55+
} else {
56+
this.messageService.addError('Invalid passphrase!', 5);
57+
}
5458
} else {
55-
this.messageService.addError('Invalid passphrase!', 5);
59+
this.activePanel++;
5660
}
57-
} else {
58-
this.activePanel++;
5961
}
6062
}
6163
setPwd() {

0 commit comments

Comments
 (0)