diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-09 09:37:20 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-09 09:37:20 +0800 |
commit | c8893fb9cac245c7ec22c8a01a12458c56a8e56a (patch) | |
tree | 31b865d2532496e035e0d524dd28638fd4a9b4cb /ui/app/components/buy-options.js | |
parent | dc702705bff055ecdc67897680a5d345b03a5faa (diff) | |
download | tangerine-wallet-browser-c8893fb9cac245c7ec22c8a01a12458c56a8e56a.tar tangerine-wallet-browser-c8893fb9cac245c7ec22c8a01a12458c56a8e56a.tar.gz tangerine-wallet-browser-c8893fb9cac245c7ec22c8a01a12458c56a8e56a.tar.bz2 tangerine-wallet-browser-c8893fb9cac245c7ec22c8a01a12458c56a8e56a.tar.lz tangerine-wallet-browser-c8893fb9cac245c7ec22c8a01a12458c56a8e56a.tar.xz tangerine-wallet-browser-c8893fb9cac245c7ec22c8a01a12458c56a8e56a.tar.zst tangerine-wallet-browser-c8893fb9cac245c7ec22c8a01a12458c56a8e56a.zip |
Hook up 'Buy with Fiat', redirect to Coinbase
Diffstat (limited to 'ui/app/components/buy-options.js')
-rw-r--r-- | ui/app/components/buy-options.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ui/app/components/buy-options.js b/ui/app/components/buy-options.js index c58e508bf..f0864d087 100644 --- a/ui/app/components/buy-options.js +++ b/ui/app/components/buy-options.js @@ -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', { + onClick: () => { + console.log("buy clicked") + const { toCoinbase, address } = this.props + toCoinbase(address) + }, + }, [ h('div.modal-content-option-title', {}, 'Coinbase'), - h('div.modal-content-option-subtitle', { - onClick: () => { - this.props.toCoinbase() - }, - }, 'Buy with Fiat'), + h('div.modal-content-option-subtitle', {}, 'Buy with Fiat'), ]), h('div.modal-content-option', {}, [ |