@ -57,10 +57,10 @@ export function updateCreateWalletPassword(createWalletPassword) {
}
}
export function updateCreateWalletPasswordConfirmation ( updateC reateWalletPasswordConfirmation) {
export function updateCreateWalletPasswordConfirmation ( c reateWalletPasswordConfirmation) {
return {
type : UPDATE_CREATE_WALLET_PASSWORD_CONFIRMATION ,
updateC reateWalletPasswordConfirmation
c reateWalletPasswordConfirmation
}
}
@ -172,7 +172,7 @@ const ACTION_HANDLERS = {
[ UPDATE_ALIAS ] : ( state , { alias } ) => ( { ... state , alias } ) ,
[ UPDATE_PASSWORD ] : ( state , { password } ) => ( { ... state , password } ) ,
[ UPDATE_CREATE_WALLET_PASSWORD ] : ( state , { createWalletPassword } ) => ( { ... state , createWalletPassword } ) ,
[ UPDATE_CREATE_WALLET_PASSWORD_CONFIRMATION ] : ( state , { createWalletConfirmation } ) => ( { ... state , createWalletConfirmation } ) ,
[ UPDATE_CREATE_WALLET_PASSWORD_CONFIRMATION ] : ( state , { createWalletPassword Confirmation } ) => ( { ... state , createWalletPassword Confirmation } ) ,
[ UPDATE_AEZEED_PASSWORD ] : ( state , { aezeedPassword } ) => ( { ... state , aezeedPassword } ) ,
[ UPDATE_SEED_INPUT ] : ( state , { inputSeedObj } ) => {
return {
@ -206,6 +206,10 @@ const ACTION_HANDLERS = {
const onboardingSelectors = { }
const passwordSelector = state => state . onboarding . password
const createWalletPasswordSelector = state => state . onboarding . createWalletPassword
const createWalletPasswordConfirmationSelector = state => state . onboarding . createWalletPasswordConfirmation
const seedSelector = state => state . onboarding . seed
const seedInputSelector = state => state . onboarding . seedInput
@ -214,6 +218,12 @@ onboardingSelectors.passwordIsValid = createSelector(
password => password . length >= 8
)
onboardingSelectors . showCreateWalletPasswordConfirmationError = createSelector (
createWalletPasswordSelector ,
createWalletPasswordConfirmationSelector ,
( pass1 , pass2 ) => pass1 !== pass2 && pass2 . length > 0
)
onboardingSelectors . reEnterSeedChecker = createSelector (
seedSelector ,
seedInputSelector ,
@ -238,7 +248,7 @@ const initialState = {
// wallet password. password used to encrypt the wallet and is required to unlock the daemon after set
createWalletPassword : '' ,
createWalletConfirmation : '' ,
createWalletPassword Confirmation : '' ,
creatingNewWallet : false ,
// seed password. this is optional and used to encrypt the seed