-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix - performance issues on activity list
- Loading branch information
Showing
9 changed files
with
72 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/blockchain-wallet-v4-frontend/src/data/components/activityList/actionTypes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
export const ACTIVITY_LIST_INITIALIZED = '@EVENT.ACTIVITY_LIST_INITIALIZED' |
3 changes: 3 additions & 0 deletions
3
packages/blockchain-wallet-v4-frontend/src/data/components/activityList/actions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import * as AT from './actionTypes' | ||
|
||
export const initialized = () => ({ type: AT.ACTIVITY_LIST_INITIALIZED }) |
25 changes: 25 additions & 0 deletions
25
packages/blockchain-wallet-v4-frontend/src/data/components/activityList/sagas.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { select, put } from 'redux-saga/effects' | ||
import { Remote } from 'blockchain-wallet-v4/src' | ||
import { actions, selectors } from 'data' | ||
|
||
export default ({ coreSagas }) => { | ||
const initialized = function * (action) { | ||
try { | ||
const logsR = yield select(selectors.core.data.misc.getLogs) | ||
const btcTransactionsR = yield select(selectors.core.data.bitcoin.getTransactions) | ||
const bchTransactionsR = yield select(selectors.core.data.bch.getTransactions) | ||
const ethTransactionsR = yield select(selectors.core.data.ethereum.getTransactions) | ||
if (!Remote.Success.is(logsR)) yield put(actions.core.data.misc.fetchLogs()) | ||
if (!Remote.Success.is(btcTransactionsR)) yield put(actions.core.data.bitcoin.fetchTransactions('', true)) | ||
if (!Remote.Success.is(bchTransactionsR)) yield put(actions.core.data.bch.fetchTransactions('', true)) | ||
if (!Remote.Success.is(ethTransactionsR)) yield put(actions.core.data.misc.ethereum.fetchTransactions()) | ||
} catch (e) { | ||
console.log(e) | ||
} | ||
} | ||
|
||
|
||
return { | ||
initialized | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters