Merge pull request #216 from lbryio/apiPublishNew

returns channel create result for use outside lbry-redux
This commit is contained in:
Sean Yesmunt 2019-10-14 15:09:34 -04:00 committed by GitHub
commit c763f35452
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

2
dist/bundle.es.js vendored
View file

@ -2525,11 +2525,13 @@ function doCreateChannel(name, amount, optionalParams) {
type: CREATE_CHANNEL_COMPLETED, type: CREATE_CHANNEL_COMPLETED,
data: { channelClaim } data: { channelClaim }
}); });
return channelClaim;
}).catch(error => { }).catch(error => {
dispatch({ dispatch({
type: CREATE_CHANNEL_FAILED, type: CREATE_CHANNEL_FAILED,
data: error.message data: error.message
}); });
return error;
}); });
}; };
} }

View file

@ -288,12 +288,14 @@ export function doCreateChannel(name: string, amount: number, optionalParams: an
type: ACTIONS.CREATE_CHANNEL_COMPLETED, type: ACTIONS.CREATE_CHANNEL_COMPLETED,
data: { channelClaim }, data: { channelClaim },
}); });
return channelClaim;
}) })
.catch(error => { .catch(error => {
dispatch({ dispatch({
type: ACTIONS.CREATE_CHANNEL_FAILED, type: ACTIONS.CREATE_CHANNEL_FAILED,
data: error.message, data: error.message,
}); });
return error;
}) })
); );
}; };