More stripe integration #6649

Closed
mayeaux wants to merge 17 commits from more-stripe-integration into master
Showing only changes of commit a60f2d19c3 - Show all commits

View file

@ -44,27 +44,27 @@ export default function LivestreamComments(props: Props) {
doCommentList,
fetchingComments,
doSuperChatList,
superChatsTotalAmount,
myChannels,
superChats, // superchats organized by tip amount
} = props;
let { superChatsReversed, superChatsFiatAmount } = props;
superChatsFiatAmount = 0;
let { superChatsReversed, superChatsFiatAmount, superChatsTotalAmount } = props;
// sum total amounts for fiat tips and lbc tips
if(superChats){
console.log(superChats);
let fiatAmount = 0;
let LBCAmount = 0;
for(const superChat of superChats){
if(superChat.is_fiat){
fiatAmount = fiatAmount + superChat.support_amount;
} else {
jessopb commented 2021-07-29 23:17:20 +02:00 (Migrated from github.com)
Review

One thing you can do is get
{ superChats: superchatsSortedByAmount, comments: superchatsSortedByDate } = props; to use a new name after destructuring.

One thing you can do is get { superChats: superchatsSortedByAmount, comments: superchatsSortedByDate } = props; to use a new name after destructuring.
jessopb commented 2021-07-29 23:19:59 +02:00 (Migrated from github.com)
Review

Perhaps whatever is connect()ed in in the index.js could just have a better name.

Perhaps whatever is connect()ed in in the index.js could just have a better name.
LBCAmount = LBCAmount + superChat.support_amount;
}
}
superChatsFiatAmount = fiatAmount;
superChatsTotalAmount = LBCAmount;
}
// TODO: why doesn't this work?