Skip to content

Commit

Permalink
fix(recurring buy): move payment info request out of scheduler to fix…
Browse files Browse the repository at this point in the history
… issue with resetting period back to one time (#3548)
  • Loading branch information
blockdylanb committed Aug 31, 2021
1 parent 7a2cfe7 commit d319afb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ import Success from './template.success'

const SchedulerContainer = (props: Props) => {
const dispatch = useDispatch()
const { method } = props

const { isAvailableMethod } = props
useEffect(() => {
props.recurringBuyActions.fetchPaymentInfo()
if (!props.isAvailableMethod) {
dispatch(actions.form.change('simpleBuyCheckout', 'period', RecurringBuyPeriods.ONE_TIME))
}
}, [method, props.isAvailableMethod])
}, [isAvailableMethod])

return <Success {...props} />
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Checkout extends PureComponent<Props> {
this.props.simpleBuyActions.fetchSDDEligible()
this.props.simpleBuyActions.fetchSBCards()
this.props.brokerageActions.fetchBankTransferAccounts()
this.props.recurringBuyActions.fetchPaymentInfo()
}
// we fetch limits as part of home banners logic at that point we had only fiatCurrency
// here we have to re-fetch for crypto currency and order type
Expand Down

0 comments on commit d319afb

Please sign in to comment.