add reselect
This commit is contained in:
parent
4b0ad681e8
commit
29679a256b
|
@ -6,6 +6,7 @@ import { uniq, isNil } from 'ramda'
|
|||
import { toEther } from '../utils/conversions'
|
||||
import { getTokenLabel } from '../utils/currencies'
|
||||
import { FundingContext } from '../context'
|
||||
import { getAuthorizations } from '../selectors/vault'
|
||||
|
||||
|
||||
Cytoscape.use(dagre)
|
||||
|
@ -35,7 +36,6 @@ const stylesheet = [
|
|||
}
|
||||
]
|
||||
|
||||
const getAuthorizations = events => events.filter(event => event.event === 'AuthorizePayment')
|
||||
const createElements = (transfers, vaultEvents) => {
|
||||
if (isNil(transfers) || isNil(vaultEvents)) return []
|
||||
const nodes = []
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
import { createSelector } from 'reselect'
|
||||
|
||||
export const getDeposits = createSelector()
|
|
@ -0,0 +1,6 @@
|
|||
import { createSelector } from 'reselect'
|
||||
|
||||
export const getAuthorizations = createSelector(
|
||||
[vaultEvents => vaultEvents.filter(event => event.event === 'AuthorizePayment')],
|
||||
event => event
|
||||
)
|
|
@ -72,6 +72,7 @@
|
|||
"react-chartjs-2": "^2.7.4",
|
||||
"react-cytoscapejs": "^1.1.0",
|
||||
"react-dom": "^16.6.3",
|
||||
"react-router-dom": "^4.3.1"
|
||||
"react-router-dom": "^4.3.1",
|
||||
"reselect": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6142,6 +6142,11 @@ require-uncached@^1.0.3:
|
|||
caller-path "^0.1.0"
|
||||
resolve-from "^1.0.0"
|
||||
|
||||
reselect@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7"
|
||||
integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==
|
||||
|
||||
resolve-from@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
|
||||
|
|
Loading…
Reference in New Issue