|
@ -134,7 +134,7 @@ export const createWallet = () => (dispatch) => { |
|
|
dispatch({ type: CHANGE_STEP, step: 4 }) |
|
|
dispatch({ type: CHANGE_STEP, step: 4 }) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export const successfullyCreatedWallet = (event) => (dispatch) => dispatch({ type: ONBOARDING_FINISHED }) |
|
|
export const successfullyCreatedWallet = () => dispatch => dispatch({ type: ONBOARDING_FINISHED }) |
|
|
|
|
|
|
|
|
// Listener for when LND creates and sends us a generated seed
|
|
|
// Listener for when LND creates and sends us a generated seed
|
|
|
export const receiveSeed = (event, { cipher_seed_mnemonic }) => (dispatch) => { |
|
|
export const receiveSeed = (event, { cipher_seed_mnemonic }) => (dispatch) => { |
|
@ -144,14 +144,14 @@ export const receiveSeed = (event, { cipher_seed_mnemonic }) => (dispatch) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Listener for when LND throws an error on seed creation
|
|
|
// Listener for when LND throws an error on seed creation
|
|
|
export const receiveSeedError = (event, error) => (dispatch) => { |
|
|
export const receiveSeedError = () => (dispatch) => { |
|
|
dispatch({ type: SET_HAS_SEED, hasSeed: true }) |
|
|
dispatch({ type: SET_HAS_SEED, hasSeed: true }) |
|
|
// there is already a seed, send user to the login component
|
|
|
// there is already a seed, send user to the login component
|
|
|
dispatch({ type: CHANGE_STEP, step: 3 }) |
|
|
dispatch({ type: CHANGE_STEP, step: 3 }) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Unlock an existing wallet with a wallet password
|
|
|
// Unlock an existing wallet with a wallet password
|
|
|
export const unlockWallet = (wallet_password) => (dispatch) => { |
|
|
export const unlockWallet = wallet_password => (dispatch) => { |
|
|
ipcRenderer.send('walletUnlocker', { msg: 'unlockWallet', data: { wallet_password } }) |
|
|
ipcRenderer.send('walletUnlocker', { msg: 'unlockWallet', data: { wallet_password } }) |
|
|
dispatch({ type: UNLOCKING_WALLET }) |
|
|
dispatch({ type: UNLOCKING_WALLET }) |
|
|
} |
|
|
} |
|
@ -174,12 +174,10 @@ const ACTION_HANDLERS = { |
|
|
[UPDATE_CREATE_WALLET_PASSWORD]: (state, { createWalletPassword }) => ({ ...state, createWalletPassword }), |
|
|
[UPDATE_CREATE_WALLET_PASSWORD]: (state, { createWalletPassword }) => ({ ...state, createWalletPassword }), |
|
|
[UPDATE_CREATE_WALLET_PASSWORD_CONFIRMATION]: (state, { createWalletPasswordConfirmation }) => ({ ...state, createWalletPasswordConfirmation }), |
|
|
[UPDATE_CREATE_WALLET_PASSWORD_CONFIRMATION]: (state, { createWalletPasswordConfirmation }) => ({ ...state, createWalletPasswordConfirmation }), |
|
|
[UPDATE_AEZEED_PASSWORD]: (state, { aezeedPassword }) => ({ ...state, aezeedPassword }), |
|
|
[UPDATE_AEZEED_PASSWORD]: (state, { aezeedPassword }) => ({ ...state, aezeedPassword }), |
|
|
[UPDATE_SEED_INPUT]: (state, { inputSeedObj }) => { |
|
|
[UPDATE_SEED_INPUT]: (state, { inputSeedObj }) => ({ |
|
|
return { |
|
|
...state, |
|
|
...state, |
|
|
seedInput: Object.assign([], state.seedInput, { [inputSeedObj.index]: inputSeedObj }) |
|
|
seedInput: Object.assign([], state.seedInput, { [inputSeedObj['index']]: inputSeedObj }) |
|
|
}), |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
[SET_AUTOPILOT]: (state, { autopilot }) => ({ ...state, autopilot }), |
|
|
[SET_AUTOPILOT]: (state, { autopilot }) => ({ ...state, autopilot }), |
|
|
|
|
|
|
|
|