Merge pull request #5575 from vimalsagar/develop

Adding CoinSwitch exchange
feature/default_network_editable
kumavis 6 years ago committed by GitHub
commit 86752630c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      app/_locales/cs/messages.json
  2. 9
      app/_locales/de/messages.json
  3. 11
      app/_locales/en/messages.json
  4. 9
      app/_locales/es/messages.json
  5. 9
      app/_locales/fr/messages.json
  6. 9
      app/_locales/hn/messages.json
  7. 9
      app/_locales/ht/messages.json
  8. 9
      app/_locales/it/messages.json
  9. 9
      app/_locales/ja/messages.json
  10. 9
      app/_locales/ko/messages.json
  11. 9
      app/_locales/nl/messages.json
  12. 9
      app/_locales/ph/messages.json
  13. 9
      app/_locales/pt/messages.json
  14. 9
      app/_locales/ru/messages.json
  15. 9
      app/_locales/sl/messages.json
  16. 9
      app/_locales/th/messages.json
  17. 9
      app/_locales/tml/messages.json
  18. 9
      app/_locales/tr/messages.json
  19. 9
      app/_locales/vi/messages.json
  20. 9
      app/_locales/zh_CN/messages.json
  21. 9
      app/_locales/zh_TW/messages.json
  22. BIN
      app/images/coinswitch_logo.png
  23. 41
      app/scripts/lib/buy-eth-url.js
  24. 25
      ui/app/components/app/modals/deposit-ether-modal.js

@ -131,6 +131,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase je světově nejoblíbenější místo k nákupu a prodeji bitcoinu, etherea nebo litecoinu." "message": "Coinbase je světově nejoblíbenější místo k nákupu a prodeji bitcoinu, etherea nebo litecoinu."
}, },
"buyCoinSwitch": {
"message": "Nákup na CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch je jediným místem, kde můžete vyměňovat více než 300 kryptocurrencí za nejlepší cenu."
},
"ok": { "ok": {
"message": "Ok" "message": "Ok"
}, },
@ -164,6 +170,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Přejít na Coinbase" "message": "Přejít na Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Přejít na CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Nasazení kontraktu" "message": "Nasazení kontraktu"
}, },

@ -131,6 +131,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase ist die weltweit bekannteste Art und Weise um Bitcoin, Ethereum und Litecoin zu kaufen und verkaufen." "message": "Coinbase ist die weltweit bekannteste Art und Weise um Bitcoin, Ethereum und Litecoin zu kaufen und verkaufen."
}, },
"buyCoinSwitch": {
"message": "Auf CoinSwitch kaufen"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch ist die One-Stop-Destination, um mehr als 300 Kryptowährungen zum besten Preis zu tauschen."
},
"ok": { "ok": {
"message": "Ok" "message": "Ok"
}, },
@ -164,6 +170,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Zu Coinbase fortfahren" "message": "Zu Coinbase fortfahren"
}, },
"continueToCoinSwitch": {
"message": "Zu CoinSwitch fortfahren"
},
"contractDeployment": { "contractDeployment": {
"message": "Smart Contract Ausführung" "message": "Smart Contract Ausführung"
}, },

@ -201,7 +201,13 @@
"message": "Buy ETH with Wyre" "message": "Buy ETH with Wyre"
}, },
"buyWithWyreDescription": { "buyWithWyreDescription": {
"message": "Wyre lets you use aa credit card to deposit ETH right in to your MetaMask account. From the Airswap website, click \"Use Fiat\" in the top-right corner. You can also use Airswap to get started with ERC 20 tokens!" "message": "Wyre lets you use a credit card to deposit ETH right in to your MetaMask account."
},
"buyCoinSwitch": {
"message": "Buy on CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch is the one-stop destination to exchange more than 300 cryptocurrencies at the best rate."
}, },
"bytes": { "bytes": {
"message": "Bytes" "message": "Bytes"
@ -314,6 +320,9 @@
"continueToWyre": { "continueToWyre": {
"message": "Continue to Wyre" "message": "Continue to Wyre"
}, },
"continueToCoinSwitch": {
"message": "Continue to CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Contract Deployment" "message": "Contract Deployment"
}, },

@ -131,6 +131,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase es la plataforma global más popular para comprar y vender Bitcoin, Ethereum y Litecoin" "message": "Coinbase es la plataforma global más popular para comprar y vender Bitcoin, Ethereum y Litecoin"
}, },
"buyCoinSwitch": {
"message": "Comprar en CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch es el destino de una sola parada para intercambiar más de 300 criptomonedas al mejor precio."
},
"cancel": { "cancel": {
"message": "Cancelar" "message": "Cancelar"
}, },
@ -176,6 +182,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Continuar a Coinbase" "message": "Continuar a Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Continuar a CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Desplegar (Deploy) contrato" "message": "Desplegar (Deploy) contrato"
}, },

@ -152,6 +152,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase est le moyen le plus populaire d'acheter et de vendre des Ethers." "message": "Coinbase est le moyen le plus populaire d'acheter et de vendre des Ethers."
}, },
"buyCoinSwitch": {
"message": "Acheter sur CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch est la destination unique pour échanger plus de 300 crypto-devises au meilleur taux."
},
"bytes": { "bytes": {
"message": "Bytes" "message": "Bytes"
}, },
@ -233,6 +239,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Continuer vers Coinbase" "message": "Continuer vers Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Continuer vers CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Déploiement de contrat" "message": "Déploiement de contrat"
}, },

@ -128,6 +128,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "बिटकइन, इथियम और लइटकइन खरदन और बचनिए दि सबसकपिय तरइनबस ह।" "message": "बिटकइन, इथियम और लइटकइन खरदन और बचनिए दि सबसकपिय तरइनबस ह।"
}, },
"buyCoinSwitch": {
"message": "कइनसिच पर खर"
},
"buyCoinSwitchExplainer": {
"message": "कइनसिच 300 स अधिक किि सरतम दर पर वििमय करन एक-सप गतवय ह।"
},
"cancel": { "cancel": {
"message": "रदद कर" "message": "रदद कर"
}, },
@ -155,6 +161,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "कइनबस कजन रख" "message": "कइनबस कजन रख"
}, },
"continueToCoinSwitch": {
"message": "कइनसिच कजन रख"
},
"contractDeployment": { "contractDeployment": {
"message": "अनध परििजन व त" "message": "अनध परििजन व त"
}, },

@ -155,6 +155,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase se fason ki pi popilè nan mond lan yo achte ak vann Bitcoin, Ethereum, ak Litecoin." "message": "Coinbase se fason ki pi popilè nan mond lan yo achte ak vann Bitcoin, Ethereum, ak Litecoin."
}, },
"buyCoinSwitch": {
"message": "Achte sou CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch se destinasyon nan yon sèl-Stop nan echanj plis pase 300 kriptoksèr nan pousantaj la pi byen."
},
"bytes": { "bytes": {
"message": "Bytes" "message": "Bytes"
}, },
@ -239,6 +245,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Kontinye Coinbase" "message": "Kontinye Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Kontinye CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Kontra Deplwaman" "message": "Kontra Deplwaman"
}, },

@ -179,6 +179,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase è il servizio più popolare al mondo per comprare e vendere Bitcoin, Ethereum e Litecoin." "message": "Coinbase è il servizio più popolare al mondo per comprare e vendere Bitcoin, Ethereum e Litecoin."
}, },
"buyCoinSwitch": {
"message": "Compra su CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch è la destinazione one-stop per lo scambio di oltre 300 criptovalute alla migliore tariffa."
},
"bytes": { "bytes": {
"message": "Bytes" "message": "Bytes"
}, },
@ -281,6 +287,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Continua su Coinbase" "message": "Continua su Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Continua su CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Distribuzione Contratto" "message": "Distribuzione Contratto"
}, },

@ -122,6 +122,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Etherを購入できます。Coinbaseは、世界的なBitcoin、Ethereum、そしてLitecoinの取引所です。" "message": "Etherを購入できます。Coinbaseは、世界的なBitcoin、Ethereum、そしてLitecoinの取引所です。"
}, },
"buyCoinSwitch": {
"message": "CoinSwitchのサイトで購入"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitchは、最高のレートで300以上の暗号化交換を行うワンストップの宛先です。"
},
"cancel": { "cancel": {
"message": "キャンセル" "message": "キャンセル"
}, },
@ -149,6 +155,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Coinbaseを開く" "message": "Coinbaseを開く"
}, },
"continueToCoinSwitch": {
"message": "CoinSwitchを開く"
},
"contractDeployment": { "contractDeployment": {
"message": "コントラクトのデプロイ" "message": "コントラクトのデプロイ"
}, },

@ -182,6 +182,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "코인베이스는 비트코인, 이더리움, 라이트코인을 거래할 수 있는 유명한 거래소입니다." "message": "코인베이스는 비트코인, 이더리움, 라이트코인을 거래할 수 있는 유명한 거래소입니다."
}, },
"buyCoinSwitch": {
"message": "코인 스위치 구입"
},
"buyCoinSwitchExplainer": {
"message": "코인 스위치는 최상의 속도로 300 개 이상의 크립토 카드를 교환하는 원 스톱 목적지입니다."
},
"bytes": { "bytes": {
"message": "바이트" "message": "바이트"
}, },
@ -287,6 +293,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "코인베이스로 계속하기" "message": "코인베이스로 계속하기"
}, },
"continueToCoinSwitch": {
"message": "코인 스위치 계속하기"
},
"contractDeployment": { "contractDeployment": {
"message": "컨트랙트 배포" "message": "컨트랙트 배포"
}, },

@ -128,6 +128,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase is 's werelds populairste manier om Bitcoin, Ethereum en Litecoin te kopen en verkopen." "message": "Coinbase is 's werelds populairste manier om Bitcoin, Ethereum en Litecoin te kopen en verkopen."
}, },
"buyCoinSwitch": {
"message": "Koop op CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch is de one-stop-bestemming om meer dan 300 cryptocurrencies tegen de beste prijs in te wisselen."
},
"cancel": { "cancel": {
"message": "Annuleer" "message": "Annuleer"
}, },
@ -155,6 +161,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Ga verder naar Coinbase" "message": "Ga verder naar Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Ga verder naar CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Contractimplementatie" "message": "Contractimplementatie"
}, },

@ -110,6 +110,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Ang Coinbase ang pinakasikat na paraan upang bumili at magbenta ng Bitcoin, Ethereum, at Litecoin sa buong mundo." "message": "Ang Coinbase ang pinakasikat na paraan upang bumili at magbenta ng Bitcoin, Ethereum, at Litecoin sa buong mundo."
}, },
"buyCoinSwitch": {
"message": "Bumili sa CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "Ang CoinSwitch ay isang one-stop destination upang makipagpalitan ng higit sa 300 mga cryptocurrency sa pinakamahusay na rate."
},
"cancel": { "cancel": {
"message": "Kanselahin" "message": "Kanselahin"
}, },
@ -131,6 +137,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Magpatuloy sa Coinbase" "message": "Magpatuloy sa Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Magpatuloy sa CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Pag-deploy ng Contract" "message": "Pag-deploy ng Contract"
}, },

@ -128,6 +128,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase é a forma mais conhecida para comprar e vender Bitcoin, Ethereum, e Litecoin." "message": "Coinbase é a forma mais conhecida para comprar e vender Bitcoin, Ethereum, e Litecoin."
}, },
"buyCoinSwitch": {
"message": "Comprar no CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch é o destino único para trocar mais de 300 moedas criptográficas com a melhor taxa."
},
"cancel": { "cancel": {
"message": "Cancelar" "message": "Cancelar"
}, },
@ -155,6 +161,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Continuar para o Coinbase" "message": "Continuar para o Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Continuar para o CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Distribuição do Contrato" "message": "Distribuição do Contrato"
}, },

@ -131,6 +131,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Биржа Coinbase – это наиболее популярный способ купить или продать Bitcoin, Ethereum и Litecoin." "message": "Биржа Coinbase – это наиболее популярный способ купить или продать Bitcoin, Ethereum и Litecoin."
}, },
"buyCoinSwitch": {
"message": "Купить на CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch - это однонаправленное место для обмена более 300 криптоконверсий по наилучшей цене."
},
"ok": { "ok": {
"message": "ОК" "message": "ОК"
}, },
@ -164,6 +170,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Продолжить в Coinbase" "message": "Продолжить в Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Продолжить в CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Развертывание контракта" "message": "Развертывание контракта"
}, },

@ -218,6 +218,12 @@
"ok": { "ok": {
"message": "V redu" "message": "V redu"
}, },
"buyCoinSwitch": {
"message": "Kupi na CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch je destinacija na enem mestu za izmenjavo več kot 300 kriptokotovitev po najboljši hitrosti."
},
"cancel": { "cancel": {
"message": "Prekliči" "message": "Prekliči"
}, },
@ -305,6 +311,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Nadaljuj na Coinbase" "message": "Nadaljuj na Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Nadaljuj na CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Ustvarjanje pogodbe" "message": "Ustvarjanje pogodbe"
}, },

@ -128,6 +128,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase เปนแหลงซอขายบตคอยนไลทคอยนและอเธอเรยมทไดบความนยมสงสดในโลก" "message": "Coinbase เปนแหลงซอขายบตคอยนไลทคอยนและอเธอเรยมทไดบความนยมสงสดในโลก"
}, },
"buyCoinSwitch": {
"message": "ซอดวย CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch เปนจดหมายปลายทางแบบครบวงจรในการแลกเปลยนสกลเงนมากกวา 300 ครงในอตราทด"
},
"cancel": { "cancel": {
"message": "ยกเลก" "message": "ยกเลก"
}, },
@ -155,6 +161,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "ไปท Coinbase" "message": "ไปท Coinbase"
}, },
"continueToCoinSwitch": {
"message": "ไปท CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "การตดตงสญญา" "message": "การตดตงสญญา"
}, },

@ -131,6 +131,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "கஇனபசிறக , எதி மறிடசக மறிக உலகிிகவிரபலமன வழி" "message": "கஇனபசிறக , எதி மறிடசக மறிக உலகிிகவிரபலமன வழி"
}, },
"buyCoinSwitch": {
"message": "நணயமிிகவ"
},
"buyCoinSwitchExplainer": {
"message": "சிறநத விிததி 300 க அதிகமன cryptocurrencies ஐ பரிிள ஒரணயம இலகணயமி ஆக."
},
"ok": { "ok": {
"message": "சரி" "message": "சரி"
}, },
@ -164,6 +170,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "கஇனபச ஐதடரவ" "message": "கஇனபச ஐதடரவ"
}, },
"continueToCoinSwitch": {
"message": "நணயமமலடரக"
},
"contractDeployment": { "contractDeployment": {
"message": "ஒபபநத வரிபடதல" "message": "ஒபபநத வரிபடதல"
}, },

@ -131,6 +131,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase Bitcoin, Ethereum, and Litecoin alıp satmanın dünyadaki en popüler yolu" "message": "Coinbase Bitcoin, Ethereum, and Litecoin alıp satmanın dünyadaki en popüler yolu"
}, },
"buyCoinSwitch": {
"message": "CoinSwitch'de satın al"
},
"buyCoinSwitchExplainer": {
"message": "Cairnswich, 300'den fazla kriptona en iyi oranda eşlik eden tek durak noktasıdır."
},
"ok": { "ok": {
"message": "Tamam" "message": "Tamam"
}, },
@ -164,6 +170,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Coinbase'e devam et" "message": "Coinbase'e devam et"
}, },
"continueToCoinSwitch": {
"message": "CoinSwitch'e devam et"
},
"contractDeployment": { "contractDeployment": {
"message": "Sözleşme kurulumu" "message": "Sözleşme kurulumu"
}, },

@ -110,6 +110,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase là dịch vụ ví điện tử thông dụng nhất thế giới để mua bán Bitcoin, Ethereum, và Litecoin" "message": "Coinbase là dịch vụ ví điện tử thông dụng nhất thế giới để mua bán Bitcoin, Ethereum, và Litecoin"
}, },
"buyCoinSwitch": {
"message": "Mua trên CoinSwitch"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch là điểm đến duy nhất để trao đổi hơn 300 tiền điện tử với tốc độ tốt nhất."
},
"cancel": { "cancel": {
"message": "Hủy" "message": "Hủy"
}, },
@ -131,6 +137,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "Tiếp tục đến Coinbase" "message": "Tiếp tục đến Coinbase"
}, },
"continueToCoinSwitch": {
"message": "Tiếp tục đến CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "Triển khai hợp đồng" "message": "Triển khai hợp đồng"
}, },

@ -134,6 +134,12 @@
"buyCoinbaseExplainer": { "buyCoinbaseExplainer": {
"message": "Coinbase 是世界上最流行的买卖比特币,以太币和莱特币的交易所。" "message": "Coinbase 是世界上最流行的买卖比特币,以太币和莱特币的交易所。"
}, },
"buyCoinSwitch": {
"message": "在CoinSwitch上购买"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch是以最优惠的价格交换超过300种加密货币的一站式目的地。"
},
"ok": { "ok": {
"message": "确认" "message": "确认"
}, },
@ -173,6 +179,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "继续访问 Coinbase" "message": "继续访问 Coinbase"
}, },
"continueToCoinSwitch": {
"message": "继续访问 CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "合约部署" "message": "合约部署"
}, },

@ -188,6 +188,12 @@
"bytes": { "bytes": {
"message": "位元組" "message": "位元組"
}, },
"buyCoinSwitch": {
"message": "在CoinSwitch上购买"
},
"buyCoinSwitchExplainer": {
"message": "CoinSwitch是以最优惠的价格交换超过300种加密货币的一站式目的地。"
},
"ok": { "ok": {
"message": "Ok" "message": "Ok"
}, },
@ -272,6 +278,9 @@
"continueToCoinbase": { "continueToCoinbase": {
"message": "繼續前往 Coinbase" "message": "繼續前往 Coinbase"
}, },
"continueToCoinSwitch": {
"message": "繼續前往 CoinSwitch"
},
"contractDeployment": { "contractDeployment": {
"message": "部署合約" "message": "部署合約"
}, },

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -11,24 +11,37 @@ module.exports = getBuyEthUrl
* network does not match any of the specified cases, or if no network is given, returns undefined. * network does not match any of the specified cases, or if no network is given, returns undefined.
* *
*/ */
function getBuyEthUrl ({ network, amount, address }) { function getBuyEthUrl ({ network, amount, address, service }) {
let url // default service by network if not specified
if (!service) service = getDefaultServiceForNetwork(network)
switch (service) {
case 'wyre':
return `https://dash.sendwyre.com/sign-up`
case 'coinswitch':
return `https://metamask.coinswitch.co/?address=${address}&to=eth`
case 'coinbase':
return `https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${amount}&address=${address}&crypto_currency=ETH`
case 'metamask-faucet':
return 'https://faucet.metamask.io/'
case 'rinkeby-faucet':
return 'https://www.rinkeby.io/'
case 'kovan-faucet':
return 'https://github.com/kovan-testnet/faucet'
}
throw new Error(`Unknown cryptocurrency exchange or faucet: "${service}"`)
}
function getDefaultServiceForNetwork (network) {
switch (network) { switch (network) {
case '1': case '1':
url = `https://dash.sendwyre.com/sign-up` return 'wyre'
break
case '3': case '3':
url = 'https://faucet.metamask.io/' return 'metamask-faucet'
break
case '4': case '4':
url = 'https://www.rinkeby.io/' return 'rinkeby-faucet'
break
case '42': case '42':
url = 'https://github.com/kovan-testnet/faucet' return 'kovan-faucet'
break
} }
return url throw new Error(`No default cryptocurrency exchange or faucet for networkId: "${network}"`)
} }

@ -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: {

Loading…
Cancel
Save