@ -16,6 +16,8 @@ let WYRE_ROW_TEXT
let SHAPESHIFT _ROW _TITLE
let SHAPESHIFT _ROW _TITLE
let SHAPESHIFT _ROW _TEXT
let SHAPESHIFT _ROW _TEXT
let FAUCET _ROW _TITLE
let FAUCET _ROW _TITLE
let COINSWITCH _ROW _TITLE
let COINSWITCH _ROW _TEXT
function mapStateToProps ( state ) {
function mapStateToProps ( state ) {
return {
return {
@ -27,7 +29,10 @@ function mapStateToProps (state) {
function mapDispatchToProps ( dispatch ) {
function mapDispatchToProps ( dispatch ) {
return {
return {
toCoinbase : ( address ) => {
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 : ( ) => {
hideModal : ( ) => {
dispatch ( actions . hideModal ( ) )
dispatch ( actions . hideModal ( ) )
@ -54,6 +59,8 @@ function DepositEtherModal (props, context) {
SHAPESHIFT _ROW _TITLE = context . t ( 'depositShapeShift' )
SHAPESHIFT _ROW _TITLE = context . t ( 'depositShapeShift' )
SHAPESHIFT _ROW _TEXT = context . t ( 'depositShapeShiftExplainer' )
SHAPESHIFT _ROW _TEXT = context . t ( 'depositShapeShiftExplainer' )
FAUCET _ROW _TITLE = context . t ( 'testFaucet' )
FAUCET _ROW _TITLE = context . t ( 'testFaucet' )
COINSWITCH _ROW _TITLE = context . t ( 'buyCoinSwitch' )
COINSWITCH _ROW _TEXT = context . t ( 'buyCoinSwitchExplainer' )
this . state = {
this . state = {
buyingWithShapeshift : false ,
buyingWithShapeshift : false ,
@ -123,7 +130,7 @@ DepositEtherModal.prototype.renderRow = function ({
}
}
DepositEtherModal . prototype . render = 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 { buyingWithShapeshift } = this . state
const isTestNetwork = [ '3' , '4' , '42' ] . find ( n => n === network )
const isTestNetwork = [ '3' , '4' , '42' ] . find ( n => n === network )
@ -187,6 +194,20 @@ DepositEtherModal.prototype.render = function () {
hide : isTestNetwork || buyingWithShapeshift ,
hide : isTestNetwork || buyingWithShapeshift ,
} ) ,
} ) ,
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 ( {
this . renderRow ( {
logo : h ( 'div.deposit-ether-modal__logo' , {
logo : h ( 'div.deposit-ether-modal__logo' , {
style : {
style : {