bugfix and cleanup
This commit is contained in:
parent
8f419fea67
commit
5e37b3ebba
3 changed files with 7 additions and 8 deletions
|
@ -131,7 +131,7 @@ export function CommentCreate(props: Props) {
|
|||
return;
|
||||
}
|
||||
|
||||
// if comment post didn't work, but tip was already made, try againt o create comment
|
||||
// if comment post didn't work, but tip was already made, try again to create comment
|
||||
if (commentFailure && tipAmount === successTip.tipAmount) {
|
||||
handleCreateComment(successTip.txid);
|
||||
return;
|
||||
|
@ -161,8 +161,6 @@ export function CommentCreate(props: Props) {
|
|||
tipChannelName = claim.name;
|
||||
}
|
||||
|
||||
console.log(activeChannelClaim);
|
||||
|
||||
setIsSubmitting(true);
|
||||
|
||||
if (activeTab === TAB_LBC) {
|
||||
|
|
|
@ -22,8 +22,6 @@ type Props = {
|
|||
fetchingComments: boolean,
|
||||
doSuperChatList: (string) => void,
|
||||
superChats: Array<Comment>,
|
||||
superChatsTotalAmount: number,
|
||||
superChatsFiatAmount: number,
|
||||
myChannels: ?Array<ChannelClaim>,
|
||||
};
|
||||
|
||||
|
@ -39,7 +37,7 @@ export default function LivestreamComments(props: Props) {
|
|||
embed,
|
||||
doCommentSocketConnect,
|
||||
doCommentSocketDisconnect,
|
||||
comments, // superchats in chronological format
|
||||
comments, // comments in chronological order (oldest first)
|
||||
doCommentList,
|
||||
fetchingComments,
|
||||
doSuperChatList,
|
||||
|
@ -47,7 +45,7 @@ export default function LivestreamComments(props: Props) {
|
|||
superChats, // superchats organized by tip amount
|
||||
} = props;
|
||||
|
||||
let { superChatsFiatAmount, superChatsTotalAmount } = props;
|
||||
let superChatsFiatAmount, superChatsTotalAmount;
|
||||
|
||||
const commentsRef = React.createRef();
|
||||
const [scrollBottom, setScrollBottom] = React.useState(true);
|
||||
|
|
|
@ -141,6 +141,8 @@ function WalletSendTip(props: Props) {
|
|||
.then((accountCheckResponse) => {
|
||||
if (accountCheckResponse === true && canReceiveFiatTip !== true) {
|
||||
setCanReceiveFiatTip(true);
|
||||
} else {
|
||||
setCanReceiveFiatTip(false);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
|
@ -332,6 +334,7 @@ function WalletSendTip(props: Props) {
|
|||
setCustomTipAmount('');
|
||||
}
|
||||
|
||||
// allow maximum of two decimal places
|
||||
if (howManyDecimals > 2) {
|
||||
tipAmount = Math.floor(tipAmount * 100) / 100;
|
||||
}
|
||||
|
@ -340,6 +343,7 @@ function WalletSendTip(props: Props) {
|
|||
|
||||
if (howManyDigits > 4 && tipAmount !== 1000) {
|
||||
setTipError('Amount cannot be over 1000 dollars');
|
||||
setCustomTipAmount(tipAmount);
|
||||
} else if (tipAmount > 1000) {
|
||||
setTipError('Amount cannot be over 1000 dollars');
|
||||
setCustomTipAmount(tipAmount);
|
||||
|
@ -576,7 +580,6 @@ function WalletSendTip(props: Props) {
|
|||
)}
|
||||
</React.Fragment>
|
||||
}
|
||||
className="form-field--price-amount"
|
||||
error={tipError}
|
||||
min="0"
|
||||
step="any"
|
||||
|
|
Loading…
Reference in a new issue