fix error when listBlocked response is null and remove unneccesary lbry-redux non-peer dependency

This commit is contained in:
jessop 2020-01-03 14:06:35 -05:00
parent 053ca52f4f
commit 9fa349f3c1
6 changed files with 71 additions and 65 deletions

17
dist/bundle.es.js vendored
View file

@ -2218,18 +2218,22 @@ function doFetchBlackListedOutpoints() {
const success = ({ const success = ({
outpoints outpoints
}) => { }) => {
const splitedOutpoints = []; const splitOutpoints = [];
if (outpoints) {
outpoints.forEach((outpoint, index) => { outpoints.forEach((outpoint, index) => {
const [txid, nout] = outpoint.split(':'); const [txid, nout] = outpoint.split(':');
splitedOutpoints[index] = { splitOutpoints[index] = {
txid, txid,
nout: Number.parseInt(nout, 10) nout: Number.parseInt(nout, 10)
}; };
}); });
}
dispatch({ dispatch({
type: FETCH_BLACK_LISTED_CONTENT_COMPLETED, type: FETCH_BLACK_LISTED_CONTENT_COMPLETED,
data: { data: {
outpoints: splitedOutpoints, outpoints: splitOutpoints,
success: true success: true
} }
}); });
@ -2267,13 +2271,18 @@ function doFetchFilteredOutpoints() {
const success = ({ const success = ({
outpoints outpoints
}) => { }) => {
const formattedOutpoints = outpoints.map(outpoint => { let formattedOutpoints = [];
if (outpoints) {
formattedOutpoints = outpoints.map(outpoint => {
const [txid, nout] = outpoint.split(':'); const [txid, nout] = outpoint.split(':');
return { return {
txid, txid,
nout: Number.parseInt(nout, 10) nout: Number.parseInt(nout, 10)
}; };
}); });
}
dispatch({ dispatch({
type: FETCH_FILTERED_CONTENT_COMPLETED, type: FETCH_FILTERED_CONTENT_COMPLETED,
data: { data: {

17
dist/bundle.js vendored
View file

@ -5822,22 +5822,26 @@ function doFetchBlackListedOutpoints() {
var success = function success(_ref) { var success = function success(_ref) {
var outpoints = _ref.outpoints; var outpoints = _ref.outpoints;
var splitedOutpoints = []; var splitOutpoints = [];
if (outpoints) {
outpoints.forEach(function (outpoint, index) { outpoints.forEach(function (outpoint, index) {
var _outpoint$split = outpoint.split(':'), var _outpoint$split = outpoint.split(':'),
_outpoint$split2 = _slicedToArray(_outpoint$split, 2), _outpoint$split2 = _slicedToArray(_outpoint$split, 2),
txid = _outpoint$split2[0], txid = _outpoint$split2[0],
nout = _outpoint$split2[1]; nout = _outpoint$split2[1];
splitedOutpoints[index] = { splitOutpoints[index] = {
txid: txid, txid: txid,
nout: Number.parseInt(nout, 10) nout: Number.parseInt(nout, 10)
}; };
}); });
}
dispatch({ dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["FETCH_BLACK_LISTED_CONTENT_COMPLETED"], type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["FETCH_BLACK_LISTED_CONTENT_COMPLETED"],
data: { data: {
outpoints: splitedOutpoints, outpoints: splitOutpoints,
success: true success: true
} }
}); });
@ -5895,7 +5899,10 @@ function doFetchFilteredOutpoints() {
var success = function success(_ref) { var success = function success(_ref) {
var outpoints = _ref.outpoints; var outpoints = _ref.outpoints;
var formattedOutpoints = outpoints.map(function (outpoint) { var formattedOutpoints = [];
if (outpoints) {
formattedOutpoints = outpoints.map(function (outpoint) {
var _outpoint$split = outpoint.split(':'), var _outpoint$split = outpoint.split(':'),
_outpoint$split2 = _slicedToArray(_outpoint$split, 2), _outpoint$split2 = _slicedToArray(_outpoint$split, 2),
txid = _outpoint$split2[0], txid = _outpoint$split2[0],
@ -5906,6 +5913,8 @@ function doFetchFilteredOutpoints() {
nout: Number.parseInt(nout, 10) nout: Number.parseInt(nout, 10)
}; };
}); });
}
dispatch({ dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["FETCH_FILTERED_CONTENT_COMPLETED"], type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["FETCH_FILTERED_CONTENT_COMPLETED"],
data: { data: {

View file

@ -53,7 +53,6 @@
"flow-bin": "^0.69.0", "flow-bin": "^0.69.0",
"flow-typed": "^2.4.0", "flow-typed": "^2.4.0",
"husky": "^0.14.3", "husky": "^0.14.3",
"lbry-redux": "lbryio/lbry-redux",
"lint-staged": "^7.0.4", "lint-staged": "^7.0.4",
"prettier": "^1.4.2", "prettier": "^1.4.2",
"rollup": "^1.8.0", "rollup": "^1.8.0",

View file

@ -10,17 +10,19 @@ export function doFetchBlackListedOutpoints() {
}); });
const success = ({ outpoints }) => { const success = ({ outpoints }) => {
const splitedOutpoints = []; const splitOutpoints = [];
if (outpoints) {
outpoints.forEach((outpoint, index) => { outpoints.forEach((outpoint, index) => {
const [txid, nout] = outpoint.split(':'); const [txid, nout] = outpoint.split(':');
splitedOutpoints[index] = { txid, nout: Number.parseInt(nout, 10) }; splitOutpoints[index] = { txid, nout: Number.parseInt(nout, 10) };
}); });
}
dispatch({ dispatch({
type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED, type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED,
data: { data: {
outpoints: splitedOutpoints, outpoints: splitOutpoints,
success: true, success: true,
}, },
}); });

View file

@ -10,10 +10,13 @@ export function doFetchFilteredOutpoints() {
}); });
const success = ({ outpoints }) => { const success = ({ outpoints }) => {
const formattedOutpoints = outpoints.map(outpoint => { let formattedOutpoints = [];
if (outpoints) {
formattedOutpoints = outpoints.map(outpoint => {
const [txid, nout] = outpoint.split(':'); const [txid, nout] = outpoint.split(':');
return { txid, nout: Number.parseInt(nout, 10) }; return { txid, nout: Number.parseInt(nout, 10) };
}); });
}
dispatch({ dispatch({
type: ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED, type: ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED,

View file

@ -3343,14 +3343,6 @@ kind-of@^6.0.0, kind-of@^6.0.2:
version "6.0.2" version "6.0.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
lbry-redux@lbryio/lbry-redux:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/f140db38dd73cead9e87549340fa9434da62ba8a"
dependencies:
proxy-polyfill "0.1.6"
reselect "^3.0.0"
uuid "^3.3.2"
lcid@^1.0.0: lcid@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
@ -4365,10 +4357,6 @@ promise-inflight@^1.0.1:
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=
proxy-polyfill@0.1.6:
version "0.1.6"
resolved "https://registry.yarnpkg.com/proxy-polyfill/-/proxy-polyfill-0.1.6.tgz#ef41ec6c66f534db15db36c54493a62d184b364e"
prr@~1.0.1: prr@~1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
@ -5462,10 +5450,6 @@ util@^0.11.0:
dependencies: dependencies:
inherits "2.0.3" inherits "2.0.3"
uuid@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
v8-compile-cache@2.0.3: v8-compile-cache@2.0.3:
version "2.0.3" version "2.0.3"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe"