tx page size cleanup
This commit is contained in:
parent
66462144b2
commit
f02c6b7a27
4 changed files with 15 additions and 5 deletions
12
dist/bundle.es.js
vendored
12
dist/bundle.es.js
vendored
|
@ -643,6 +643,13 @@ var transaction_types = /*#__PURE__*/Object.freeze({
|
|||
ABANDON: ABANDON
|
||||
});
|
||||
|
||||
// PAGE SIZE
|
||||
const PAGE_SIZE$1 = 50;
|
||||
|
||||
var transaction_list = /*#__PURE__*/Object.freeze({
|
||||
PAGE_SIZE: PAGE_SIZE$1
|
||||
});
|
||||
|
||||
const SEARCH_TYPES = {
|
||||
FILE: 'file',
|
||||
CHANNEL: 'channel',
|
||||
|
@ -1450,8 +1457,8 @@ const selectFilteredTransactions = reselect.createSelector(selectTransactionItem
|
|||
});
|
||||
|
||||
const makeSelectFilteredTransactionsForPage = (page = 1) => reselect.createSelector(selectFilteredTransactions, filteredTransactions => {
|
||||
const start = (Number(page) - 1) * Number(PAGE_SIZE);
|
||||
const end = Number(page) * Number(PAGE_SIZE);
|
||||
const start = (Number(page) - 1) * Number(PAGE_SIZE$1);
|
||||
const end = Number(page) * Number(PAGE_SIZE$1);
|
||||
return filteredTransactions && filteredTransactions.length ? filteredTransactions.slice(start, end) : [];
|
||||
});
|
||||
|
||||
|
@ -4988,6 +4995,7 @@ exports.SETTINGS = settings;
|
|||
exports.SORT_OPTIONS = sort_options;
|
||||
exports.THUMBNAIL_STATUSES = thumbnail_upload_statuses;
|
||||
exports.TRANSACTIONS = transaction_types;
|
||||
exports.TX_LIST = transaction_list;
|
||||
exports.batchActions = batchActions;
|
||||
exports.blockedReducer = blockedReducer;
|
||||
exports.buildURI = buildURI;
|
||||
|
|
2
src/constants/transaction_list.js
Normal file
2
src/constants/transaction_list.js
Normal file
|
@ -0,0 +1,2 @@
|
|||
// PAGE SIZE
|
||||
export const PAGE_SIZE = 50;
|
|
@ -6,6 +6,7 @@ import * as SETTINGS from 'constants/settings';
|
|||
import * as SORT_OPTIONS from 'constants/sort_options';
|
||||
import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses';
|
||||
import * as TRANSACTIONS from 'constants/transaction_types';
|
||||
import * as TX_LIST from 'constants/transaction_list';
|
||||
import { SEARCH_TYPES, SEARCH_OPTIONS } from 'constants/search';
|
||||
import { DEFAULT_KNOWN_TAGS, DEFAULT_FOLLOWED_TAGS, MATURE_TAGS } from 'constants/tags';
|
||||
import Lbry from 'lbry';
|
||||
|
@ -21,6 +22,7 @@ export {
|
|||
SEARCH_OPTIONS,
|
||||
SETTINGS,
|
||||
TRANSACTIONS,
|
||||
TX_LIST,
|
||||
SORT_OPTIONS,
|
||||
PAGES,
|
||||
DEFAULT_KNOWN_TAGS,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { createSelector } from 'reselect';
|
||||
import * as TRANSACTIONS from 'constants/transaction_types';
|
||||
import { PAGE_SIZE } from 'constants/claim';
|
||||
import { PAGE_SIZE } from 'constants/transaction_list';
|
||||
|
||||
export const selectState = state => state.wallet || {};
|
||||
|
||||
|
@ -217,8 +217,6 @@ export const selectTransactionItems = createSelector(
|
|||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
export const selectRecentTransactions = createSelector(
|
||||
selectTransactionItems,
|
||||
transactions => {
|
||||
|
|
Loading…
Reference in a new issue