More stripe integration #6649

Closed
mayeaux wants to merge 17 commits from more-stripe-integration into master
mayeaux commented 2021-07-22 22:04:55 +02:00 (Migrated from github.com)

No need to merge for now this can just serve as a tracking PR for the time being

No need to merge for now this can just serve as a tracking PR for the time being
jessopb commented 2021-07-23 00:21:30 +02:00 (Migrated from github.com)

If you rebase, the flow lint error should be gone because I initialized tipError = '' - empty string is a string and falsy.

   ui/component/walletTipAmountSelector/view.jsx:123:17
   123|     let regexp, tipError;
                        ^^^^^^^^ [1]
                        ```
                        I assi
If you rebase, the flow lint error should be gone because I initialized tipError = '' - empty string is a string and falsy. ``` ui/component/walletTipAmountSelector/view.jsx:123:17 123| let regexp, tipError; ^^^^^^^^ [1] ``` I assi
jessopb (Migrated from github.com) requested changes 2021-07-29 23:53:39 +02:00
jessopb (Migrated from github.com) commented 2021-07-29 23:52:07 +02:00

Probably not necessary to round a roundedAmount

Probably not necessary to round a roundedAmount
@ -22,7 +22,9 @@ type Props = {
fetchingComments: boolean,
doSuperChatList: (string) => void,
superChats: Array<Comment>,
superChatsReversed: Array,
jessopb (Migrated from github.com) commented 2021-07-29 23:16:09 +02:00

This does'nt seem to be passed in. Does it belong in props types?

This does'nt seem to be passed in. Does it belong in props types?
@ -58,6 +61,36 @@ export default function LivestreamComments(props: Props) {
const discussionElement = document.querySelector('.livestream__comments');
jessopb (Migrated from github.com) commented 2021-07-29 23:17:20 +02:00

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 (Migrated from github.com) commented 2021-07-29 23:19:59 +02:00

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.
jessopb (Migrated from github.com) commented 2021-07-29 23:40:43 +02:00

If the superChats type is indeed Array, then clone = superChats.slice();

If the superChats type is indeed Array<Comment>, then clone = superChats.slice();
jessopb (Migrated from github.com) commented 2021-07-29 23:04:41 +02:00

...%amount% dollars', {amount: MAXIMUM_FIAT_TIP})

`...%amount% dollars', {amount: MAXIMUM_FIAT_TIP})`
@ -273,8 +273,8 @@ function WalletSendTip(props: Props) {
Lbryio.call(
jessopb (Migrated from github.com) commented 2021-07-29 23:06:52 +02:00

We should try to move this component to /web at least. Ideally This is a function imported from lbryinc repo.

We should try to move this component to /web at least. Ideally This is a function imported from lbryinc repo.
@ -320,0 +353,4 @@
tipAmount = Number(tipAmount.toString().match(/^-?\d+(?:\.\d{0,8})?/)[0]);
setTipError('Please only use up to 8 decimals')
}
jessopb (Migrated from github.com) commented 2021-07-29 23:45:28 +02:00

MAXIMUM_FIAT_TIP

MAXIMUM_FIAT_TIP
@ -320,0 +354,4 @@
setTipError('Please only use up to 8 decimals')
}
setCustomTipAmount(tipAmount);
jessopb (Migrated from github.com) commented 2021-07-29 23:46:10 +02:00

repeated text, without i18n

repeated text, without i18n
@ -444,7 +489,7 @@ function WalletSendTip(props: Props) {
{/* short explainer under the button */}
jessopb (Migrated from github.com) commented 2021-07-29 23:08:53 +02:00

artifact

artifact
jessopb (Migrated from github.com) commented 2021-07-29 23:23:15 +02:00

We've been starting bool vars like this with 'is' - 'isValidTipInput'

We've been starting bool vars like this with 'is' - 'isValidTipInput'
@ -71,3 +73,4 @@
// $FlowFixMe
this.experimentalUiEnabled = user && user.experimental_ui;
jessopb (Migrated from github.com) commented 2021-07-29 23:25:14 +02:00

Functional component soon?

Functional component soon?
jessopb (Migrated from github.com) commented 2021-07-29 23:01:43 +02:00

log

log
@ -193,2 +194,4 @@
doToast({ message: displayString, isError: true });
} else {
// probably an error from stripe
var displayString = 'There was an error getting your card setup, please let support know';
jessopb (Migrated from github.com) commented 2021-07-29 22:59:34 +02:00

var -> let
Errors could probably be consts at the top?
API_DOWN_ERROR_MESSAGE
CARD_ERROR_MESSAGE

var -> let Errors could probably be consts at the top? API_DOWN_ERROR_MESSAGE CARD_ERROR_MESSAGE
@ -195,1 +197,4 @@
var displayString = 'There was an error getting your card setup, please let support know';
doToast({ message: displayString, isError: true });
console.log('Unseen before error');
jessopb (Migrated from github.com) commented 2021-07-29 22:59:40 +02:00

log?

log?
jessopb (Migrated from github.com) commented 2021-07-29 22:56:19 +02:00

I think this is used elsewhere.

I think this is used elsewhere.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#6649
No description provided.