Merge pull request #102 from lbryio/fix-filterMapSelectors

bugfix
This commit is contained in:
Sean Yesmunt 2020-08-18 10:20:54 -04:00 committed by GitHub
commit b96561477a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 24 deletions

8
dist/bundle.es.js vendored
View file

@ -1464,21 +1464,21 @@ const makeSelectFetchingCostInfoForUri = uri => reselect.createSelector(selectFe
const selectState$2 = state => state.blacklist || {};
const selectBlackListedOutpoints = reselect.createSelector(selectState$2, state => state.blackListedOutpoints);
const selectBlacklistedOutpointMap = reselect.createSelector(selectBlackListedOutpoints, outpoints => outpoints.reduce((acc, val) => {
const selectBlacklistedOutpointMap = reselect.createSelector(selectBlackListedOutpoints, outpoints => outpoints ? outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`;
return { ...acc,
[outpoint]: 1
};
}, {}));
}, {}) : {});
const selectState$3 = state => state.filtered || {};
const selectFilteredOutpoints = reselect.createSelector(selectState$3, state => state.filteredOutpoints);
const selectFilteredOutpointMap = reselect.createSelector(selectFilteredOutpoints, outpoints => outpoints.reduce((acc, val) => {
const selectFilteredOutpointMap = reselect.createSelector(selectFilteredOutpoints, outpoints => outpoints ? outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`;
return { ...acc,
[outpoint]: 1
};
}, {}));
}, {}) : {});
const selectState$4 = state => state.homepage || {};

8
dist/bundle.js vendored
View file

@ -4556,10 +4556,10 @@ var selectBlackListedOutpoints = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["c
return state.blackListedOutpoints;
});
var selectBlacklistedOutpointMap = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectBlackListedOutpoints, function (outpoints) {
return outpoints.reduce(function (acc, val) {
return outpoints ? outpoints.reduce(function (acc, val) {
var outpoint = "".concat(val.txid, ":").concat(val.nout);
return _objectSpread({}, acc, _defineProperty({}, outpoint, 1));
}, {});
}, {}) : {};
});
/***/ }),
@ -4585,10 +4585,10 @@ var selectFilteredOutpoints = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["crea
return state.filteredOutpoints;
});
var selectFilteredOutpointMap = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectFilteredOutpoints, function (outpoints) {
return outpoints.reduce(function (acc, val) {
return outpoints ? outpoints.reduce(function (acc, val) {
var outpoint = "".concat(val.txid, ":").concat(val.nout);
return _objectSpread({}, acc, _defineProperty({}, outpoint, 1));
}, {});
}, {}) : {};
});
/***/ }),

View file

@ -7,12 +7,16 @@ export const selectBlackListedOutpoints = createSelector(
state => state.blackListedOutpoints
);
export const selectBlacklistedOutpointMap = createSelector(selectBlackListedOutpoints, outpoints =>
outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`;
return {
...acc,
[outpoint]: 1,
};
}, {})
export const selectBlacklistedOutpointMap = createSelector(
selectBlackListedOutpoints,
outpoints =>
outpoints
? outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`;
return {
...acc,
[outpoint]: 1,
};
}, {})
: {}
);

View file

@ -7,12 +7,16 @@ export const selectFilteredOutpoints = createSelector(
state => state.filteredOutpoints
);
export const selectFilteredOutpointMap = createSelector(selectFilteredOutpoints, outpoints =>
outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`;
return {
...acc,
[outpoint]: 1,
};
}, {})
export const selectFilteredOutpointMap = createSelector(
selectFilteredOutpoints,
outpoints =>
outpoints
? outpoints.reduce((acc, val) => {
const outpoint = `${val.txid}:${val.nout}`;
return {
...acc,
[outpoint]: 1,
};
}, {})
: {}
);