provide for clearing channel errors
This commit is contained in:
parent
0b867cbbdc
commit
906199d866
5 changed files with 29 additions and 3 deletions
15
dist/bundle.es.js
vendored
15
dist/bundle.es.js
vendored
|
@ -142,6 +142,7 @@ const CLAIM_REPOST_STARTED = 'CLAIM_REPOST_STARTED';
|
|||
const CLAIM_REPOST_COMPLETED = 'CLAIM_REPOST_COMPLETED';
|
||||
const CLAIM_REPOST_FAILED = 'CLAIM_REPOST_FAILED';
|
||||
const CLEAR_REPOST_ERROR = 'CLEAR_REPOST_ERROR';
|
||||
const CLEAR_CHANNEL_ERRORS = 'CLEAR_CHANNEL_ERRORS';
|
||||
const CHECK_PUBLISH_NAME_STARTED = 'CHECK_PUBLISH_NAME_STARTED';
|
||||
const CHECK_PUBLISH_NAME_COMPLETED = 'CHECK_PUBLISH_NAME_COMPLETED';
|
||||
const UPDATE_PENDING_CLAIMS = 'UPDATE_PENDING_CLAIMS';
|
||||
|
@ -426,6 +427,7 @@ var action_types = /*#__PURE__*/Object.freeze({
|
|||
CLAIM_REPOST_COMPLETED: CLAIM_REPOST_COMPLETED,
|
||||
CLAIM_REPOST_FAILED: CLAIM_REPOST_FAILED,
|
||||
CLEAR_REPOST_ERROR: CLEAR_REPOST_ERROR,
|
||||
CLEAR_CHANNEL_ERRORS: CLEAR_CHANNEL_ERRORS,
|
||||
CHECK_PUBLISH_NAME_STARTED: CHECK_PUBLISH_NAME_STARTED,
|
||||
CHECK_PUBLISH_NAME_COMPLETED: CHECK_PUBLISH_NAME_COMPLETED,
|
||||
UPDATE_PENDING_CLAIMS: UPDATE_PENDING_CLAIMS,
|
||||
|
@ -3490,6 +3492,12 @@ function doFetchClaimsByChannel(uri, page = 1) {
|
|||
};
|
||||
}
|
||||
|
||||
function doClearChannelErrors() {
|
||||
return {
|
||||
type: CLEAR_CHANNEL_ERRORS
|
||||
};
|
||||
}
|
||||
|
||||
function doCreateChannel(name, amount, optionalParams, cb) {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
|
@ -3548,7 +3556,6 @@ function doCreateChannel(name, amount, optionalParams, cb) {
|
|||
type: CREATE_CHANNEL_FAILED,
|
||||
data: error.message
|
||||
});
|
||||
return error;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -5517,6 +5524,11 @@ reducers[ABANDON_CLAIM_SUCCEEDED] = (state, action) => {
|
|||
});
|
||||
};
|
||||
|
||||
reducers[CLEAR_CHANNEL_ERRORS] = state => _extends$b({}, state, {
|
||||
createChannelError: null,
|
||||
updateChannelError: null
|
||||
});
|
||||
|
||||
reducers[CREATE_CHANNEL_STARTED] = state => _extends$b({}, state, {
|
||||
creatingChannel: true,
|
||||
createChannelError: null
|
||||
|
@ -6971,6 +6983,7 @@ exports.doCheckPendingClaims = doCheckPendingClaims;
|
|||
exports.doCheckPublishNameAvailability = doCheckPublishNameAvailability;
|
||||
exports.doCheckReflectingFiles = doCheckReflectingFiles;
|
||||
exports.doClaimSearch = doClaimSearch;
|
||||
exports.doClearChannelErrors = doClearChannelErrors;
|
||||
exports.doClearPublish = doClearPublish;
|
||||
exports.doClearPurchasedUriSuccess = doClearPurchasedUriSuccess;
|
||||
exports.doClearRepostError = doClearRepostError;
|
||||
|
|
|
@ -119,6 +119,7 @@ export const CLAIM_REPOST_STARTED = 'CLAIM_REPOST_STARTED';
|
|||
export const CLAIM_REPOST_COMPLETED = 'CLAIM_REPOST_COMPLETED';
|
||||
export const CLAIM_REPOST_FAILED = 'CLAIM_REPOST_FAILED';
|
||||
export const CLEAR_REPOST_ERROR = 'CLEAR_REPOST_ERROR';
|
||||
export const CLEAR_CHANNEL_ERRORS = 'CLEAR_CHANNEL_ERRORS';
|
||||
export const CHECK_PUBLISH_NAME_STARTED = 'CHECK_PUBLISH_NAME_STARTED';
|
||||
export const CHECK_PUBLISH_NAME_COMPLETED = 'CHECK_PUBLISH_NAME_COMPLETED';
|
||||
export const UPDATE_PENDING_CLAIMS = 'UPDATE_PENDING_CLAIMS';
|
||||
|
|
|
@ -74,6 +74,7 @@ export {
|
|||
doImportChannel,
|
||||
doRepost,
|
||||
doClearRepostError,
|
||||
doClearChannelErrors,
|
||||
doCheckPublishNameAvailability,
|
||||
doPurchaseList,
|
||||
doCheckPendingClaims,
|
||||
|
|
|
@ -339,6 +339,12 @@ export function doFetchClaimsByChannel(uri: string, page: number = 1) {
|
|||
};
|
||||
}
|
||||
|
||||
export function doClearChannelErrors() {
|
||||
return {
|
||||
type: ACTIONS.CLEAR_CHANNEL_ERRORS,
|
||||
};
|
||||
}
|
||||
|
||||
export function doCreateChannel(name: string, amount: number, optionalParams: any, cb: any) {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({
|
||||
|
@ -410,7 +416,6 @@ export function doCreateChannel(name: string, amount: number, optionalParams: an
|
|||
type: ACTIONS.CREATE_CHANNEL_FAILED,
|
||||
data: error.message,
|
||||
});
|
||||
return error;
|
||||
})
|
||||
);
|
||||
};
|
||||
|
|
|
@ -42,7 +42,7 @@ type State = {
|
|||
[number]: Array<string>,
|
||||
},
|
||||
},
|
||||
updateChannelError: string,
|
||||
updateChannelError: ?string,
|
||||
updatingChannel: boolean,
|
||||
pendingChannelImport: string | boolean,
|
||||
repostLoading: boolean,
|
||||
|
@ -467,6 +467,12 @@ reducers[ACTIONS.ABANDON_CLAIM_SUCCEEDED] = (state: State, action: any): State =
|
|||
});
|
||||
};
|
||||
|
||||
reducers[ACTIONS.CLEAR_CHANNEL_ERRORS] = (state: State): State => ({
|
||||
...state,
|
||||
createChannelError: null,
|
||||
updateChannelError: null,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.CREATE_CHANNEL_STARTED] = (state: State): State => ({
|
||||
...state,
|
||||
creatingChannel: true,
|
||||
|
|
Loading…
Reference in a new issue