Skip to content

Commit

Permalink
fix(Activity List): add sagaRegister
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed May 4, 2018
1 parent 7088206 commit 2de02ad
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { takeLatest } from 'redux-saga/effects'
import * as AT from './actionTypes'
import sagas from './sagas'

export default ({ coreSagas }) => {
const activityListSagas = sagas({ coreSagas })

return function * () {
yield takeLatest(AT.ACTIVITY_LIST_INITIALIZED, activityListSagas.initialized)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fork } from 'redux-saga/effects'
import activityList from './activityList/sagaRegister'
import exchange from './exchange/sagaRegister'
import importBtcAddress from './importBtcAddress/sagaRegister'
import priceChart from './priceChart/sagaRegister'
Expand All @@ -10,6 +11,7 @@ import signMessage from './signMessage/sagaRegister'
import usedAddresses from './usedAddresses/sagaRegister'

export default ({ api, coreSagas }) => function * () {
yield fork(activityList({ coreSagas }))
yield fork(exchange({ api, coreSagas }))
yield fork(importBtcAddress({ api, coreSagas }))
yield fork(priceChart({ coreSagas }))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const getData = createSelector(
[getLogs, getBtcTransactions, getBchTransactions, getEthTransactions, getNumber],
(logs, btc, bch, eth, number) => {
const transform = (logs, btc, bch, eth) => {
return flatten([logs, btc, bch, eth].map(sort(descend(prop('time')))).map(take(number)))
return take(number, flatten([logs, btc, bch, eth].map(sort(descend(prop('time')))).map(take(number))))
}
return lift(transform)(logs, btc, bch, eth)
}
Expand Down

0 comments on commit 2de02ad

Please sign in to comment.