diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index 1fe5fc5bb..da5af7864 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -14,7 +14,7 @@ import { useHistory } from 'react-router'; type Props = { uri: string, claim: StreamClaim, - createComment: (string, string, string, ?string) => void, + createComment: (string, string, string, ?string) => Promise, channels: ?Array, topLevelId?: string, onDoneReplying?: () => void, @@ -61,13 +61,14 @@ export function CommentCreate(props: Props) { function handleSubmit() { if (channel !== CHANNEL_NEW && commentValue.length) { - createComment(commentValue, claimId, channel, topLevelId); - } - - setCommentValue(''); - - if (onDoneReplying) { - onDoneReplying(); + createComment(commentValue, claimId, channel, topLevelId).then(res => { + if (res && res.signature) { + setCommentValue(''); + if (onDoneReplying) { + onDoneReplying(); + } + } + }); } } diff --git a/ui/redux/actions/comments.js b/ui/redux/actions/comments.js index d3c163e1d..62d344acb 100644 --- a/ui/redux/actions/comments.js +++ b/ui/redux/actions/comments.js @@ -209,6 +209,7 @@ export function doCommentCreate( claimId: claim_id, }, }); + return result; }) .catch(error => { dispatch({