fix error when listBlocked response is null and remove unneccesary lbry-redux non-peer dependency
This commit is contained in:
parent
053ca52f4f
commit
9fa349f3c1
6 changed files with 71 additions and 65 deletions
41
dist/bundle.es.js
vendored
41
dist/bundle.es.js
vendored
|
@ -2218,18 +2218,22 @@ function doFetchBlackListedOutpoints() {
|
|||
const success = ({
|
||||
outpoints
|
||||
}) => {
|
||||
const splitedOutpoints = [];
|
||||
outpoints.forEach((outpoint, index) => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
splitedOutpoints[index] = {
|
||||
txid,
|
||||
nout: Number.parseInt(nout, 10)
|
||||
};
|
||||
});
|
||||
const splitOutpoints = [];
|
||||
|
||||
if (outpoints) {
|
||||
outpoints.forEach((outpoint, index) => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
splitOutpoints[index] = {
|
||||
txid,
|
||||
nout: Number.parseInt(nout, 10)
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: FETCH_BLACK_LISTED_CONTENT_COMPLETED,
|
||||
data: {
|
||||
outpoints: splitedOutpoints,
|
||||
outpoints: splitOutpoints,
|
||||
success: true
|
||||
}
|
||||
});
|
||||
|
@ -2267,13 +2271,18 @@ function doFetchFilteredOutpoints() {
|
|||
const success = ({
|
||||
outpoints
|
||||
}) => {
|
||||
const formattedOutpoints = outpoints.map(outpoint => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
return {
|
||||
txid,
|
||||
nout: Number.parseInt(nout, 10)
|
||||
};
|
||||
});
|
||||
let formattedOutpoints = [];
|
||||
|
||||
if (outpoints) {
|
||||
formattedOutpoints = outpoints.map(outpoint => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
return {
|
||||
txid,
|
||||
nout: Number.parseInt(nout, 10)
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: FETCH_FILTERED_CONTENT_COMPLETED,
|
||||
data: {
|
||||
|
|
53
dist/bundle.js
vendored
53
dist/bundle.js
vendored
|
@ -5822,22 +5822,26 @@ function doFetchBlackListedOutpoints() {
|
|||
|
||||
var success = function success(_ref) {
|
||||
var outpoints = _ref.outpoints;
|
||||
var splitedOutpoints = [];
|
||||
outpoints.forEach(function (outpoint, index) {
|
||||
var _outpoint$split = outpoint.split(':'),
|
||||
_outpoint$split2 = _slicedToArray(_outpoint$split, 2),
|
||||
txid = _outpoint$split2[0],
|
||||
nout = _outpoint$split2[1];
|
||||
var splitOutpoints = [];
|
||||
|
||||
if (outpoints) {
|
||||
outpoints.forEach(function (outpoint, index) {
|
||||
var _outpoint$split = outpoint.split(':'),
|
||||
_outpoint$split2 = _slicedToArray(_outpoint$split, 2),
|
||||
txid = _outpoint$split2[0],
|
||||
nout = _outpoint$split2[1];
|
||||
|
||||
splitOutpoints[index] = {
|
||||
txid: txid,
|
||||
nout: Number.parseInt(nout, 10)
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
splitedOutpoints[index] = {
|
||||
txid: txid,
|
||||
nout: Number.parseInt(nout, 10)
|
||||
};
|
||||
});
|
||||
dispatch({
|
||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["FETCH_BLACK_LISTED_CONTENT_COMPLETED"],
|
||||
data: {
|
||||
outpoints: splitedOutpoints,
|
||||
outpoints: splitOutpoints,
|
||||
success: true
|
||||
}
|
||||
});
|
||||
|
@ -5895,17 +5899,22 @@ function doFetchFilteredOutpoints() {
|
|||
|
||||
var success = function success(_ref) {
|
||||
var outpoints = _ref.outpoints;
|
||||
var formattedOutpoints = outpoints.map(function (outpoint) {
|
||||
var _outpoint$split = outpoint.split(':'),
|
||||
_outpoint$split2 = _slicedToArray(_outpoint$split, 2),
|
||||
txid = _outpoint$split2[0],
|
||||
nout = _outpoint$split2[1];
|
||||
var formattedOutpoints = [];
|
||||
|
||||
if (outpoints) {
|
||||
formattedOutpoints = outpoints.map(function (outpoint) {
|
||||
var _outpoint$split = outpoint.split(':'),
|
||||
_outpoint$split2 = _slicedToArray(_outpoint$split, 2),
|
||||
txid = _outpoint$split2[0],
|
||||
nout = _outpoint$split2[1];
|
||||
|
||||
return {
|
||||
txid: txid,
|
||||
nout: Number.parseInt(nout, 10)
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
txid: txid,
|
||||
nout: Number.parseInt(nout, 10)
|
||||
};
|
||||
});
|
||||
dispatch({
|
||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["FETCH_FILTERED_CONTENT_COMPLETED"],
|
||||
data: {
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
"flow-bin": "^0.69.0",
|
||||
"flow-typed": "^2.4.0",
|
||||
"husky": "^0.14.3",
|
||||
"lbry-redux": "lbryio/lbry-redux",
|
||||
"lint-staged": "^7.0.4",
|
||||
"prettier": "^1.4.2",
|
||||
"rollup": "^1.8.0",
|
||||
|
|
|
@ -10,17 +10,19 @@ export function doFetchBlackListedOutpoints() {
|
|||
});
|
||||
|
||||
const success = ({ outpoints }) => {
|
||||
const splitedOutpoints = [];
|
||||
const splitOutpoints = [];
|
||||
if (outpoints) {
|
||||
outpoints.forEach((outpoint, index) => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
|
||||
outpoints.forEach((outpoint, index) => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
splitOutpoints[index] = { txid, nout: Number.parseInt(nout, 10) };
|
||||
});
|
||||
}
|
||||
|
||||
splitedOutpoints[index] = { txid, nout: Number.parseInt(nout, 10) };
|
||||
});
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED,
|
||||
data: {
|
||||
outpoints: splitedOutpoints,
|
||||
outpoints: splitOutpoints,
|
||||
success: true,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -10,10 +10,13 @@ export function doFetchFilteredOutpoints() {
|
|||
});
|
||||
|
||||
const success = ({ outpoints }) => {
|
||||
const formattedOutpoints = outpoints.map(outpoint => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
return { txid, nout: Number.parseInt(nout, 10) };
|
||||
});
|
||||
let formattedOutpoints = [];
|
||||
if (outpoints) {
|
||||
formattedOutpoints = outpoints.map(outpoint => {
|
||||
const [txid, nout] = outpoint.split(':');
|
||||
return { txid, nout: Number.parseInt(nout, 10) };
|
||||
});
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED,
|
||||
|
|
16
yarn.lock
16
yarn.lock
|
@ -3343,14 +3343,6 @@ kind-of@^6.0.0, kind-of@^6.0.2:
|
|||
version "6.0.2"
|
||||
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:
|
||||
version "1.0.0"
|
||||
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"
|
||||
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:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
|
||||
|
@ -5462,10 +5450,6 @@ util@^0.11.0:
|
|||
dependencies:
|
||||
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:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe"
|
||||
|
|
Loading…
Reference in a new issue