diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index 558e90031..74d1ddbd7 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -246,7 +246,9 @@ export function CommentCreate(props: Props) { } function doSubmitTip() { - if (!activeChannelClaim) return; + if (!activeChannelClaim || isSubmitting) return; + + setSubmitting(true); const params = { amount: tipAmount, claim_id: claimId, channel_id: activeChannelClaim.claim_id }; const activeChannelName = activeChannelClaim && activeChannelClaim.name; @@ -256,8 +258,6 @@ export function CommentCreate(props: Props) { const channelClaimId = claim.signing_channel ? claim.signing_channel.claim_id : claim.claim_id; const tipChannelName = claim.signing_channel ? claim.signing_channel.name : claim.name; - setSubmitting(true); - if (activeTab === TAB_LBC) { // call sendTip and then run the callback from the response // second parameter is callback @@ -309,8 +309,11 @@ export function CommentCreate(props: Props) { * @param {string} [environment] Optional environment for Stripe (test|live) */ function handleCreateComment(txid, payment_intent_id, environment) { + if (isSubmitting) return; + setShowEmotes(false); setSubmitting(true); + const stickerValue = selectedSticker && buildValidSticker(selectedSticker.name); createComment(stickerValue || commentValue, claimId, parentId, txid, payment_intent_id, environment, !!stickerValue)