Skip to content

Commit

Permalink
feature(get payment method when adding a bank account)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixtedemaupeou committed May 10, 2018
1 parent d83e0e3 commit 7ea8e58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'

import { actions } from 'data'
import AddBankDetails from './template.js'

class AddBankDetailsContainer extends React.PureComponent {
Expand All @@ -8,6 +11,11 @@ class AddBankDetailsContainer extends React.PureComponent {
this.onSubmit = this.onSubmit.bind(this)
}

componentDidMount () {
const { quoteR } = this.props
quoteR.map(quote => this.props.coinifyDataActions.getPaymentMediums(quote))
}

onSubmit (e) {
e.preventDefault()
// TODO: Store form data in the state
Expand All @@ -22,6 +30,7 @@ const mapStateToProps = (state) => ({
})

const mapDispatchToProps = (dispatch) => ({
coinifyDataActions: bindActionCreators(actions.core.data.coinify, dispatch)
})

export default connect(mapStateToProps, mapDispatchToProps)(AddBankDetailsContainer)
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Sell = props => {
</CheckoutWrapper>
</StepView>
<StepView step={1}>
<AddBankDetails />
<AddBankDetails quoteR={sellQuoteR} />
</StepView>
<StepView step={2}>
<AddCustomerDetails />
Expand Down

0 comments on commit 7ea8e58

Please sign in to comment.