Skip to content
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

Merged
merged 2 commits into from
Aug 23, 2021

Conversation

blockdylanb
Copy link
Contributor

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.

…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
Copy link
Contributor

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?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gostei

) : (
<></>
)}
</>
Copy link
Contributor

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}</>,
Copy link
Contributor

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)
Copy link
Contributor

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 &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

@schnogz schnogz merged commit 7559939 into release/v4.54 Aug 23, 2021
@schnogz schnogz deleted the fix/FWN-731 branch August 23, 2021 13:21
@blockchain blockchain deleted a comment from feccruz Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants