aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2019-03-29 10:20:19 +0800
committerkumavis <aaron@kumavis.me>2019-03-29 10:20:19 +0800
commit38b85adbe01fe3f01ec81f395026dc1cbe2c0ec8 (patch)
treed41ec29bb4797952e465799601ab7d4f46c90bb7 /ui
parent649a1d483a574dcff902708f95b37329a02709a8 (diff)
parentb004b182bfafc317412d8dff1a43020db8dac3fe (diff)
downloadtangerine-wallet-browser-38b85adbe01fe3f01ec81f395026dc1cbe2c0ec8.tar
tangerine-wallet-browser-38b85adbe01fe3f01ec81f395026dc1cbe2c0ec8.tar.gz
tangerine-wallet-browser-38b85adbe01fe3f01ec81f395026dc1cbe2c0ec8.tar.bz2
tangerine-wallet-browser-38b85adbe01fe3f01ec81f395026dc1cbe2c0ec8.tar.lz
tangerine-wallet-browser-38b85adbe01fe3f01ec81f395026dc1cbe2c0ec8.tar.xz
tangerine-wallet-browser-38b85adbe01fe3f01ec81f395026dc1cbe2c0ec8.tar.zst
tangerine-wallet-browser-38b85adbe01fe3f01ec81f395026dc1cbe2c0ec8.zip
Merge branch 'develop' of https://github.com/vimalsagar/metamask-extension into vimalsagar-develop
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/app/modals/deposit-ether-modal.js25
1 files changed, 23 insertions, 2 deletions
diff --git a/ui/app/components/app/modals/deposit-ether-modal.js b/ui/app/components/app/modals/deposit-ether-modal.js
index 082ff76a9..def88f085 100644
--- a/ui/app/components/app/modals/deposit-ether-modal.js
+++ b/ui/app/components/app/modals/deposit-ether-modal.js
@@ -16,6 +16,8 @@ let WYRE_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 {
@@ -27,7 +29,10 @@ function mapStateToProps (state) {
function mapDispatchToProps (dispatch) {
return {
toCoinbase: (address) => {
- dispatch(actions.buyEth({ network: '1', address, amount: 0 }))
+ dispatch(actions.buyEth({ service: 'coinbase', address, amount: 0 }))
+ },
+ toCoinSwitch: (address) => {
+ dispatch(actions.buyEth({ service: 'coinswitch', address }))
},
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\')',
},
}),