1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Hook up 'Buy with Fiat', redirect to Coinbase

This commit is contained in:
sdtsui 2017-08-08 18:37:20 -07:00
parent dc702705bf
commit c8893fb9ca

View File

@ -7,12 +7,13 @@ const actions = require('../actions')
function mapStateToProps (state) {
return {
network: state.metamask.network,
address: state.metamask.selectedAddress,
}
}
function mapDispatchToProps (dispatch) {
return {
toCoinbase: () => {
toCoinbase: (address) => {
dispatch(actions.buyEth({ network: '1', address, amount: 0 }))
},
}
@ -41,13 +42,15 @@ BuyOptions.prototype.render = function () {
h('div.modal-content-options.flex-column.flex-center', {}, [
h('div.modal-content-option', {}, [
h('div.modal-content-option-title', {}, 'Coinbase'),
h('div.modal-content-option-subtitle', {
h('div.modal-content-option', {
onClick: () => {
this.props.toCoinbase()
console.log("buy clicked")
const { toCoinbase, address } = this.props
toCoinbase(address)
},
}, 'Buy with Fiat'),
}, [
h('div.modal-content-option-title', {}, 'Coinbase'),
h('div.modal-content-option-subtitle', {}, 'Buy with Fiat'),
]),
h('div.modal-content-option', {}, [