refactor: DRY
This commit is contained in:
parent
0de4fcce93
commit
8336c36d28
1 changed files with 7 additions and 6 deletions
|
|
@ -111,12 +111,13 @@ const SystemPerformance = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const transactionsToShow = R.map(convertFiatToLocale)(
|
const prepareTransactions = getLastTimePeriod =>
|
||||||
R.filter(isInRangeAndNoError(false), allTransactions),
|
allTransactions
|
||||||
)
|
.filter(isInRangeAndNoError(getLastTimePeriod))
|
||||||
const transactionsLastTimePeriod = R.map(convertFiatToLocale)(
|
.map(convertFiatToLocale)
|
||||||
R.filter(isInRangeAndNoError(true), allTransactions),
|
|
||||||
)
|
const transactionsToShow = prepareTransactions(false)
|
||||||
|
const transactionsLastTimePeriod = prepareTransactions(true)
|
||||||
|
|
||||||
const getNumTransactions = () => {
|
const getNumTransactions = () => {
|
||||||
return R.length(transactionsToShow)
|
return R.length(transactionsToShow)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue