diff options
author | Vimal <vtiwari@coinswitch.co> | 2018-10-22 19:14:21 +0800 |
---|---|---|
committer | Vimal <vtiwari@coinswitch.co> | 2018-10-22 19:14:21 +0800 |
commit | 82b11b69a5dea38a4a036096528354a5a291a447 (patch) | |
tree | 307832bdb1f8e07b941157901f86ebdd0d9aa560 /ui/app | |
parent | 5504c8b9659f9345bb6d1b38d4d5ff91db1b6611 (diff) | |
download | tangerine-wallet-browser-82b11b69a5dea38a4a036096528354a5a291a447.tar tangerine-wallet-browser-82b11b69a5dea38a4a036096528354a5a291a447.tar.gz tangerine-wallet-browser-82b11b69a5dea38a4a036096528354a5a291a447.tar.bz2 tangerine-wallet-browser-82b11b69a5dea38a4a036096528354a5a291a447.tar.lz tangerine-wallet-browser-82b11b69a5dea38a4a036096528354a5a291a447.tar.xz tangerine-wallet-browser-82b11b69a5dea38a4a036096528354a5a291a447.tar.zst tangerine-wallet-browser-82b11b69a5dea38a4a036096528354a5a291a447.zip |
Adding CoinSwitch exchange
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/modals/deposit-ether-modal.js | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js index 09137d39a..6686eaefa 100644 --- a/ui/app/components/modals/deposit-ether-modal.js +++ b/ui/app/components/modals/deposit-ether-modal.js @@ -16,6 +16,8 @@ let COINBASE_ROW_TEXT let SHAPESHIFT_ROW_TITLE let SHAPESHIFT_ROW_TEXT let FAUCET_ROW_TITLE +let COINSWITCH_ROW_TITLE +let COINSWITCH_ROW_TEXT function mapStateToProps (state) { return { @@ -29,6 +31,9 @@ function mapDispatchToProps (dispatch) { toCoinbase: (address) => { dispatch(actions.buyEth({ network: '1', address, amount: 0 })) }, + toCoinSwitch: (address) => { + dispatch(actions.buyEth({ network: '5', address, amount: 0 })) + }, hideModal: () => { dispatch(actions.hideModal()) }, @@ -54,6 +59,8 @@ function DepositEtherModal (props, context) { SHAPESHIFT_ROW_TITLE = context.t('depositShapeShift') SHAPESHIFT_ROW_TEXT = context.t('depositShapeShiftExplainer') FAUCET_ROW_TITLE = context.t('testFaucet') + COINSWITCH_ROW_TITLE = context.t('buyCoinSwitch') + COINSWITCH_ROW_TEXT = context.t('buyCoinSwitchExplainer') this.state = { buyingWithShapeshift: false, @@ -123,7 +130,7 @@ DepositEtherModal.prototype.renderRow = function ({ } DepositEtherModal.prototype.render = function () { - const { network, toCoinbase, address, toFaucet } = this.props + const { network, toCoinbase, toCoinSwitch, address, toFaucet } = this.props const { buyingWithShapeshift } = this.state const isTestNetwork = ['3', '4', '42'].find(n => n === network) @@ -190,6 +197,20 @@ DepositEtherModal.prototype.render = function () { this.renderRow({ logo: h('div.deposit-ether-modal__logo', { style: { + backgroundImage: 'url(\'./images/coinswitch_logo.png\')', + height: '40px', + }, + }), + title: COINSWITCH_ROW_TITLE, + text: COINSWITCH_ROW_TEXT, + buttonLabel: this.context.t('continueToCoinSwitch'), + onButtonClick: () => toCoinSwitch(address), + hide: isTestNetwork || buyingWithShapeshift, + }), + + this.renderRow({ + logo: h('div.deposit-ether-modal__logo', { + style: { backgroundImage: 'url(\'./images/shapeshift logo.png\')', }, }), |