modifications
This commit is contained in:
parent
284cff48c2
commit
69f9562b01
4 changed files with 30 additions and 55 deletions
28
dist/bundle.es.js
vendored
28
dist/bundle.es.js
vendored
|
@ -1907,10 +1907,9 @@ function doFetchFilteredOutpoints() {
|
||||||
const success = ({
|
const success = ({
|
||||||
outpoints
|
outpoints
|
||||||
}) => {
|
}) => {
|
||||||
const splitedOutpoints = [];
|
const formattedOutpoints = outpoints.map(outpoint => {
|
||||||
outpoints.forEach((outpoint, index) => {
|
|
||||||
const [txid, nout] = outpoint.split(':');
|
const [txid, nout] = outpoint.split(':');
|
||||||
splitedOutpoints[index] = {
|
return {
|
||||||
txid,
|
txid,
|
||||||
nout: Number.parseInt(nout, 10)
|
nout: Number.parseInt(nout, 10)
|
||||||
};
|
};
|
||||||
|
@ -1918,8 +1917,7 @@ function doFetchFilteredOutpoints() {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: FETCH_FILTERED_CONTENT_COMPLETED,
|
type: FETCH_FILTERED_CONTENT_COMPLETED,
|
||||||
data: {
|
data: {
|
||||||
outpoints: splitedOutpoints,
|
outpoints: formattedOutpoints
|
||||||
success: true
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1930,8 +1928,7 @@ function doFetchFilteredOutpoints() {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: FETCH_FILTERED_CONTENT_FAILED,
|
type: FETCH_FILTERED_CONTENT_FAILED,
|
||||||
data: {
|
data: {
|
||||||
error,
|
error
|
||||||
success: false
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -2634,33 +2631,28 @@ const blacklistReducer = handleActions({
|
||||||
}, defaultState$5);
|
}, defaultState$5);
|
||||||
|
|
||||||
const defaultState$6 = {
|
const defaultState$6 = {
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: undefined,
|
|
||||||
filteredOutpoints: undefined
|
filteredOutpoints: undefined
|
||||||
};
|
};
|
||||||
const filteredReducer = handleActions({
|
const filteredReducer = handleActions({
|
||||||
[FETCH_FILTERED_CONTENT_STARTED]: state => ({ ...state,
|
[FETCH_FILTERED_CONTENT_STARTED]: state => ({ ...state,
|
||||||
fetchingFilteredOutpoints: true
|
loading: true
|
||||||
}),
|
}),
|
||||||
[FETCH_FILTERED_CONTENT_COMPLETED]: (state, action) => {
|
[FETCH_FILTERED_CONTENT_COMPLETED]: (state, action) => {
|
||||||
const {
|
const {
|
||||||
outpoints,
|
outpoints
|
||||||
success
|
|
||||||
} = action.data;
|
} = action.data;
|
||||||
return { ...state,
|
return { ...state,
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: success,
|
|
||||||
filteredOutpoints: outpoints
|
filteredOutpoints: outpoints
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[FETCH_FILTERED_CONTENT_FAILED]: (state, action) => {
|
[FETCH_FILTERED_CONTENT_FAILED]: (state, action) => {
|
||||||
const {
|
const {
|
||||||
error,
|
error
|
||||||
success
|
|
||||||
} = action.data;
|
} = action.data;
|
||||||
return { ...state,
|
return { ...state,
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: success,
|
|
||||||
fetchingFilteredOutpointsError: error
|
fetchingFilteredOutpointsError: error
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
30
dist/bundle.js
vendored
30
dist/bundle.js
vendored
|
@ -3325,14 +3325,13 @@ function doFetchFilteredOutpoints() {
|
||||||
|
|
||||||
var success = function success(_ref) {
|
var success = function success(_ref) {
|
||||||
var outpoints = _ref.outpoints;
|
var outpoints = _ref.outpoints;
|
||||||
var splitedOutpoints = [];
|
var formattedOutpoints = outpoints.map(function (outpoint) {
|
||||||
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] = {
|
return {
|
||||||
txid: txid,
|
txid: txid,
|
||||||
nout: Number.parseInt(nout, 10)
|
nout: Number.parseInt(nout, 10)
|
||||||
};
|
};
|
||||||
|
@ -3340,8 +3339,7 @@ function doFetchFilteredOutpoints() {
|
||||||
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: {
|
||||||
outpoints: splitedOutpoints,
|
outpoints: formattedOutpoints
|
||||||
success: true
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -3351,8 +3349,7 @@ function doFetchFilteredOutpoints() {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["FETCH_FILTERED_CONTENT_FAILED"],
|
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["FETCH_FILTERED_CONTENT_FAILED"],
|
||||||
data: {
|
data: {
|
||||||
error: error,
|
error: error
|
||||||
success: false
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -4247,30 +4244,23 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||||
|
|
||||||
|
|
||||||
var defaultState = {
|
var defaultState = {
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: undefined,
|
|
||||||
filteredOutpoints: undefined
|
filteredOutpoints: undefined
|
||||||
};
|
};
|
||||||
var filteredReducer = Object(util_redux_utils__WEBPACK_IMPORTED_MODULE_1__["handleActions"])((_handleActions = {}, _defineProperty(_handleActions, constants_action_types__WEBPACK_IMPORTED_MODULE_0__["FETCH_FILTERED_CONTENT_STARTED"], function (state) {
|
var filteredReducer = Object(util_redux_utils__WEBPACK_IMPORTED_MODULE_1__["handleActions"])((_handleActions = {}, _defineProperty(_handleActions, constants_action_types__WEBPACK_IMPORTED_MODULE_0__["FETCH_FILTERED_CONTENT_STARTED"], function (state) {
|
||||||
return _objectSpread({}, state, {
|
return _objectSpread({}, state, {
|
||||||
fetchingFilteredOutpoints: true
|
loading: true
|
||||||
});
|
});
|
||||||
}), _defineProperty(_handleActions, constants_action_types__WEBPACK_IMPORTED_MODULE_0__["FETCH_FILTERED_CONTENT_COMPLETED"], function (state, action) {
|
}), _defineProperty(_handleActions, constants_action_types__WEBPACK_IMPORTED_MODULE_0__["FETCH_FILTERED_CONTENT_COMPLETED"], function (state, action) {
|
||||||
var _action$data = action.data,
|
var outpoints = action.data.outpoints;
|
||||||
outpoints = _action$data.outpoints,
|
|
||||||
success = _action$data.success;
|
|
||||||
return _objectSpread({}, state, {
|
return _objectSpread({}, state, {
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: success,
|
|
||||||
filteredOutpoints: outpoints
|
filteredOutpoints: outpoints
|
||||||
});
|
});
|
||||||
}), _defineProperty(_handleActions, constants_action_types__WEBPACK_IMPORTED_MODULE_0__["FETCH_FILTERED_CONTENT_FAILED"], function (state, action) {
|
}), _defineProperty(_handleActions, constants_action_types__WEBPACK_IMPORTED_MODULE_0__["FETCH_FILTERED_CONTENT_FAILED"], function (state, action) {
|
||||||
var _action$data2 = action.data,
|
var error = action.data.error;
|
||||||
error = _action$data2.error,
|
|
||||||
success = _action$data2.success;
|
|
||||||
return _objectSpread({}, state, {
|
return _objectSpread({}, state, {
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: success,
|
|
||||||
fetchingFilteredOutpointsError: error
|
fetchingFilteredOutpointsError: error
|
||||||
});
|
});
|
||||||
}), _handleActions), defaultState);
|
}), _handleActions), defaultState);
|
||||||
|
|
|
@ -10,18 +10,15 @@ export function doFetchFilteredOutpoints() {
|
||||||
});
|
});
|
||||||
|
|
||||||
const success = ({ outpoints }) => {
|
const success = ({ outpoints }) => {
|
||||||
const splitedOutpoints = [];
|
const formattedOutpoints = outpoints.map(outpoint => {
|
||||||
|
|
||||||
outpoints.forEach((outpoint, index) => {
|
|
||||||
const [txid, nout] = outpoint.split(':');
|
const [txid, nout] = outpoint.split(':');
|
||||||
|
return { txid, nout: Number.parseInt(nout, 10) };
|
||||||
splitedOutpoints[index] = { txid, nout: Number.parseInt(nout, 10) };
|
|
||||||
});
|
});
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED,
|
type: ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED,
|
||||||
data: {
|
data: {
|
||||||
outpoints: splitedOutpoints,
|
outpoints: formattedOutpoints,
|
||||||
success: true,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -31,7 +28,6 @@ export function doFetchFilteredOutpoints() {
|
||||||
type: ACTIONS.FETCH_FILTERED_CONTENT_FAILED,
|
type: ACTIONS.FETCH_FILTERED_CONTENT_FAILED,
|
||||||
data: {
|
data: {
|
||||||
error,
|
error,
|
||||||
success: false,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,8 +2,7 @@ import * as ACTIONS from 'constants/action_types';
|
||||||
import { handleActions } from 'util/redux-utils';
|
import { handleActions } from 'util/redux-utils';
|
||||||
|
|
||||||
const defaultState = {
|
const defaultState = {
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: undefined,
|
|
||||||
filteredOutpoints: undefined,
|
filteredOutpoints: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,24 +10,22 @@ export const filteredReducer = handleActions(
|
||||||
{
|
{
|
||||||
[ACTIONS.FETCH_FILTERED_CONTENT_STARTED]: state => ({
|
[ACTIONS.FETCH_FILTERED_CONTENT_STARTED]: state => ({
|
||||||
...state,
|
...state,
|
||||||
fetchingFilteredOutpoints: true,
|
loading: true,
|
||||||
}),
|
}),
|
||||||
[ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED]: (state, action) => {
|
[ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED]: (state, action) => {
|
||||||
const { outpoints, success } = action.data;
|
const { outpoints } = action.data;
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: success,
|
|
||||||
filteredOutpoints: outpoints,
|
filteredOutpoints: outpoints,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[ACTIONS.FETCH_FILTERED_CONTENT_FAILED]: (state, action) => {
|
[ACTIONS.FETCH_FILTERED_CONTENT_FAILED]: (state, action) => {
|
||||||
const { error, success } = action.data;
|
const { error } = action.data;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
fetchingFilteredOutpoints: false,
|
loading: false,
|
||||||
fetchingFilteredOutpointsSucceed: success,
|
|
||||||
fetchingFilteredOutpointsError: error,
|
fetchingFilteredOutpointsError: error,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue