-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(recurring buy): reconfigures how the frequency selection screen works by adding a new endpoint to check if payment method works for a particular frequency #3496
Conversation
…orks by adding a new endpoint to check if payment method works for a particular frequency
// ONE_TIME is not a recurring buy option so take it out before displaying | ||
const periods = Object.values(RecurringBuyPeriods) | ||
const RowDisplay = ({ method, paymentInfo, period, setPeriod }: RowDisplayProps) => { | ||
// ONE_TIME is a special case that we need to insert manually |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you expand on this comment for future us? when is ONE_TIME used and when is it not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gostei
) : ( | ||
<></> | ||
)} | ||
</> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to return fragments on all of these? would null
work?
</FrequencyScreen> | ||
) | ||
return data.cata({ | ||
Failure: (error) => <>{error}</>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we style errors better?
class Frequency extends PureComponent<Props> { | ||
constructor(props) { | ||
super(props) | ||
this.handleFrequencySelection = this.handleFrequencySelection.bind(this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be able to delete this constructor. you shouldnt need to bind this
when you define the function with a fat arrow
@@ -43,8 +44,8 @@ class OrderSummary extends PureComponent<Props> { | |||
// first time buyers have 1 tx at this point and RB is set to one time buy so send them to RB walkthrough flow | |||
if ( | |||
this.props.isRecurringBuy && | |||
this.props.orders.length <= 1 && | |||
this.props.order.period === RecurringBuyPeriods.ONE_TIME && | |||
// this.props.orders.length <= 1 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
Description (optional)
Add a concise explanation of the changes.
Testing Steps (optional)
Detail the steps required for the reviewer(s) to verify and test these changes.