Skip to content

Commit

Permalink
fix(Refresh): refresh btc tx list in initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Jun 23, 2018
1 parent 1315f0b commit bb43180
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { actions, selectors } from 'data'

export default ({ coreSagas }) => {
const logLocation = 'components/bchTransactions/sagas'

const initialized = function * () {
try {
const defaultSource = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ export default ({ coreSagas }) => {

const initialized = function * () {
try {
const defaultSource = ''
const initialValues = {
source: '',
source: defaultSource,
status: '',
search: ''
}
yield put(actions.form.initialize('btcTransactions', initialValues))
yield put(actions.core.data.bitcoin.fetchTransactions(initialValues.source))
yield put(actions.core.data.bitcoin.fetchTransactions(defaultSource, true))
} catch (e) {
yield put(actions.logs.logErrorMessage(logLocation, 'initialized', e))
}
Expand All @@ -35,7 +36,6 @@ export default ({ coreSagas }) => {
const source = prop('source', formValues)
const threshold = 250
const { yMax, yOffset } = action.payload

if (yMax - yOffset < threshold) {
const onlyShow = equals(source, 'all') ? '' : (source.xpub || source.address)
yield put(actions.core.data.bitcoin.fetchTransactions(onlyShow, false))
Expand Down

0 comments on commit bb43180

Please sign in to comment.