remove id
This commit is contained in:
parent
9fd930564e
commit
3e1871e170
2 changed files with 3 additions and 7 deletions
|
@ -323,18 +323,16 @@ export function doUpdateChannel(params: any) {
|
|||
};
|
||||
}
|
||||
|
||||
export function doImportChannel(id: string, certificate: string) {
|
||||
export function doImportChannel(certificate: string) {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.IMPORT_CHANNEL_STARTED,
|
||||
data: id,
|
||||
});
|
||||
|
||||
return Lbry.channel_import({ channel_data: certificate })
|
||||
.then((result: string) => {
|
||||
dispatch({
|
||||
type: ACTIONS.IMPORT_CHANNEL_COMPLETED,
|
||||
data: { result }, // "Added channel signing key for @name."
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
|
@ -350,10 +350,8 @@ reducers[ACTIONS.UPDATE_CHANNEL_FAILED] = (state: State, action: any): State =>
|
|||
});
|
||||
};
|
||||
|
||||
reducers[ACTIONS.IMPORT_CHANNEL_STARTED] = (state: State, action: any): State => {
|
||||
const channelId: string = action.data.id;
|
||||
return Object.assign({}, state, { pendingChannelImports: channelId });
|
||||
};
|
||||
reducers[ACTIONS.IMPORT_CHANNEL_STARTED] = (state: State): State =>
|
||||
Object.assign({}, state, { pendingChannelImports: true });
|
||||
|
||||
reducers[ACTIONS.IMPORT_CHANNEL_COMPLETED] = (state: State): State =>
|
||||
Object.assign({}, state, { pendingChannelImports: false });
|
||||
|
|
Loading…
Add table
Reference in a new issue