Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Passwords are valid by default #4075

Merged
merged 2 commits into from
Jan 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/src/modals/CreateAccount/NewAccount/newAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class CreateAccount extends Component {
accountNameError: ERRORS.noName,
accounts: null,
isValidName: false,
isValidPass: false,
isValidPass: true,
passwordHint: '',
password1: '',
password1Error: null,
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/CreateAccount/NewImport/newImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class NewImport extends Component {
accountName: '',
accountNameError: ERRORS.noName,
isValidFile: false,
isValidPass: false,
isValidPass: true,
isValidName: false,
password: '',
passwordError: null,
Expand Down
4 changes: 1 addition & 3 deletions js/src/modals/CreateAccount/RawKey/rawKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class RawKey extends Component {
accountNameError: ERRORS.noName,
isValidKey: false,
isValidName: false,
isValidPass: false,
isValidPass: true,
passwordHint: '',
password1: '',
password1Error: null,
Expand Down Expand Up @@ -119,8 +119,6 @@ export default class RawKey extends Component {
const rawKey = event.target.value;
let rawKeyError = null;

console.log(rawKey.length, rawKey);

if (!rawKey || !rawKey.trim().length) {
rawKeyError = ERRORS.noKey;
} else if (rawKey.substr(0, 2) !== '0x' || rawKey.substr(2).length !== 64 || !api.util.isHex(rawKey)) {
Expand Down
4 changes: 2 additions & 2 deletions js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export default class RecoveryPhrase extends Component {
state = {
accountName: '',
accountNameError: ERRORS.noName,
isValidPass: false,
isValidPass: true,
isValidName: false,
isValidPhrase: false,
isValidPhrase: true,
passwordHint: '',
password1: '',
password1Error: null,
Expand Down
9 changes: 7 additions & 2 deletions js/src/modals/CreateAccount/createAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export default class CreateAccount extends Component {

if (createType === 'fromNew' || createType === 'fromPhrase') {
let phrase = this.state.phrase;

if (createType === 'fromPhrase' && windowsPhrase) {
phrase = phrase
.split(' ') // get the words
Expand Down Expand Up @@ -271,7 +272,9 @@ export default class CreateAccount extends Component {

this.newError(error);
});
} else if (createType === 'fromRaw') {
}

if (createType === 'fromRaw') {
return api.parity
.newAccountFromSecret(this.state.rawKey, this.state.password)
.then((address) => {
Expand All @@ -296,7 +299,9 @@ export default class CreateAccount extends Component {

this.newError(error);
});
} else if (createType === 'fromGeth') {
}

if (createType === 'fromGeth') {
return api.parity
.importGethAccounts(this.state.gethAddresses)
.then((result) => {
Expand Down