Skip to content

Commit

Permalink
fix(create bch wallet on btc wallet creation without needing relogging)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixtedemaupeou committed Jun 1, 2018
1 parent 224a927 commit 9a8c682
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export default ({ coreSagas }) => {
const newHDAccount = function * (action) {
try {
yield call(askSecondPasswordEnhancer(coreSagas.wallet.newHDAccount), action.payload)
yield put(actions.core.kvStore.bch.addBchAccount())
yield put(actions.core.kvStore.bch.fetchMetadataBch())
yield put(actions.alerts.displaySuccess(C.NEW_WALLET_CREATE_SUCCESS))
} catch (e) {
yield put(actions.logs.logErrorMessage(logLocation, 'newHDAccount', e))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ export const CREATE_METADATA_BCH = '@CORE.CREATE_METADATA_BCH'
export const SET_BCH_ACCOUNT_LABEL = '@CORE.SET_BCH_ACCOUNT_LABEL'
export const SET_BCH_ACCOUNT_ARCHIVED = '@CORE.SET_BCH_ACCOUNT_ARCHIVED'
export const SET_DEFAULT_BCH_ACCOUNT = '@CORE.SET_DEFAULT_BCH_ACCOUNT'
export const ADD_BCH_ACCOUNT = '@CORE.ADD_BCH_ACCOUNT'
export const ADD_BCH_ACCOUNT_COMPLETE = '@CORE.ADD_BCH_ACCOUNT_COMPLETE'
export const SET_TRANSACTION_NOTE_BCH = '@CORE.SET_TRANSACTION_NOTE_BCH'
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ export const setAccountArchived = (accountIdx, archived) =>
export const setDefaultAccountIdx = (index) =>
({ type: AT.SET_DEFAULT_BCH_ACCOUNT, payload: { index } })

export const addBchAccount = () => ({ type: AT.ADD_BCH_ACCOUNT })

export const addBchAccountComplete = (bchAccounts) => ({ type: AT.ADD_BCH_ACCOUNT_COMPLETE, payload: { bchAccounts } })

export const setTxNotesBch = (txHash, txNote) => ({type: AT.SET_TRANSACTION_NOTE_BCH, payload: {txHash, txNote}})
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ export default (state = INITIAL_STATE, action) => {
const setDefaultAccount = assoc('default_account_idx', index)
return over(valueLens, setDefaultAccount, state)
}
case AT.ADD_BCH_ACCOUNT_COMPLETE: {
const { bchAccounts } = action.payload
const valueLens = compose(mapped, KVStoreEntry.value)
const setBchAccounts = assoc('accounts', bchAccounts)
return over(valueLens, setBchAccounts, state)
}
case AT.SET_TRANSACTION_NOTE_BCH: {
const {txHash, txNote} = action.payload
let valueLens = compose(mapped, KVStoreEntry.value)
Expand Down

0 comments on commit 9a8c682

Please sign in to comment.