Merge pull request #334 from lbryio/fix-channelErrors
This commit is contained in:
commit
8eb071d1e4
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_COMPLETED = 'CLAIM_REPOST_COMPLETED';
|
||||||
const CLAIM_REPOST_FAILED = 'CLAIM_REPOST_FAILED';
|
const CLAIM_REPOST_FAILED = 'CLAIM_REPOST_FAILED';
|
||||||
const CLEAR_REPOST_ERROR = 'CLEAR_REPOST_ERROR';
|
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_STARTED = 'CHECK_PUBLISH_NAME_STARTED';
|
||||||
const CHECK_PUBLISH_NAME_COMPLETED = 'CHECK_PUBLISH_NAME_COMPLETED';
|
const CHECK_PUBLISH_NAME_COMPLETED = 'CHECK_PUBLISH_NAME_COMPLETED';
|
||||||
const UPDATE_PENDING_CLAIMS = 'UPDATE_PENDING_CLAIMS';
|
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_COMPLETED: CLAIM_REPOST_COMPLETED,
|
||||||
CLAIM_REPOST_FAILED: CLAIM_REPOST_FAILED,
|
CLAIM_REPOST_FAILED: CLAIM_REPOST_FAILED,
|
||||||
CLEAR_REPOST_ERROR: CLEAR_REPOST_ERROR,
|
CLEAR_REPOST_ERROR: CLEAR_REPOST_ERROR,
|
||||||
|
CLEAR_CHANNEL_ERRORS: CLEAR_CHANNEL_ERRORS,
|
||||||
CHECK_PUBLISH_NAME_STARTED: CHECK_PUBLISH_NAME_STARTED,
|
CHECK_PUBLISH_NAME_STARTED: CHECK_PUBLISH_NAME_STARTED,
|
||||||
CHECK_PUBLISH_NAME_COMPLETED: CHECK_PUBLISH_NAME_COMPLETED,
|
CHECK_PUBLISH_NAME_COMPLETED: CHECK_PUBLISH_NAME_COMPLETED,
|
||||||
UPDATE_PENDING_CLAIMS: UPDATE_PENDING_CLAIMS,
|
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) {
|
function doCreateChannel(name, amount, optionalParams, cb) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -3548,7 +3556,6 @@ function doCreateChannel(name, amount, optionalParams, cb) {
|
||||||
type: CREATE_CHANNEL_FAILED,
|
type: CREATE_CHANNEL_FAILED,
|
||||||
data: error.message
|
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, {
|
reducers[CREATE_CHANNEL_STARTED] = state => _extends$b({}, state, {
|
||||||
creatingChannel: true,
|
creatingChannel: true,
|
||||||
createChannelError: null
|
createChannelError: null
|
||||||
|
@ -6971,6 +6983,7 @@ exports.doCheckPendingClaims = doCheckPendingClaims;
|
||||||
exports.doCheckPublishNameAvailability = doCheckPublishNameAvailability;
|
exports.doCheckPublishNameAvailability = doCheckPublishNameAvailability;
|
||||||
exports.doCheckReflectingFiles = doCheckReflectingFiles;
|
exports.doCheckReflectingFiles = doCheckReflectingFiles;
|
||||||
exports.doClaimSearch = doClaimSearch;
|
exports.doClaimSearch = doClaimSearch;
|
||||||
|
exports.doClearChannelErrors = doClearChannelErrors;
|
||||||
exports.doClearPublish = doClearPublish;
|
exports.doClearPublish = doClearPublish;
|
||||||
exports.doClearPurchasedUriSuccess = doClearPurchasedUriSuccess;
|
exports.doClearPurchasedUriSuccess = doClearPurchasedUriSuccess;
|
||||||
exports.doClearRepostError = doClearRepostError;
|
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_COMPLETED = 'CLAIM_REPOST_COMPLETED';
|
||||||
export const CLAIM_REPOST_FAILED = 'CLAIM_REPOST_FAILED';
|
export const CLAIM_REPOST_FAILED = 'CLAIM_REPOST_FAILED';
|
||||||
export const CLEAR_REPOST_ERROR = 'CLEAR_REPOST_ERROR';
|
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_STARTED = 'CHECK_PUBLISH_NAME_STARTED';
|
||||||
export const CHECK_PUBLISH_NAME_COMPLETED = 'CHECK_PUBLISH_NAME_COMPLETED';
|
export const CHECK_PUBLISH_NAME_COMPLETED = 'CHECK_PUBLISH_NAME_COMPLETED';
|
||||||
export const UPDATE_PENDING_CLAIMS = 'UPDATE_PENDING_CLAIMS';
|
export const UPDATE_PENDING_CLAIMS = 'UPDATE_PENDING_CLAIMS';
|
||||||
|
|
|
@ -74,6 +74,7 @@ export {
|
||||||
doImportChannel,
|
doImportChannel,
|
||||||
doRepost,
|
doRepost,
|
||||||
doClearRepostError,
|
doClearRepostError,
|
||||||
|
doClearChannelErrors,
|
||||||
doCheckPublishNameAvailability,
|
doCheckPublishNameAvailability,
|
||||||
doPurchaseList,
|
doPurchaseList,
|
||||||
doCheckPendingClaims,
|
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) {
|
export function doCreateChannel(name: string, amount: number, optionalParams: any, cb: any) {
|
||||||
return (dispatch: Dispatch) => {
|
return (dispatch: Dispatch) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -410,7 +416,6 @@ export function doCreateChannel(name: string, amount: number, optionalParams: an
|
||||||
type: ACTIONS.CREATE_CHANNEL_FAILED,
|
type: ACTIONS.CREATE_CHANNEL_FAILED,
|
||||||
data: error.message,
|
data: error.message,
|
||||||
});
|
});
|
||||||
return error;
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@ type State = {
|
||||||
[number]: Array<string>,
|
[number]: Array<string>,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
updateChannelError: string,
|
updateChannelError: ?string,
|
||||||
updatingChannel: boolean,
|
updatingChannel: boolean,
|
||||||
pendingChannelImport: string | boolean,
|
pendingChannelImport: string | boolean,
|
||||||
repostLoading: 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 => ({
|
reducers[ACTIONS.CREATE_CHANNEL_STARTED] = (state: State): State => ({
|
||||||
...state,
|
...state,
|
||||||
creatingChannel: true,
|
creatingChannel: true,
|
||||||
|
|
Loading…
Reference in a new issue