From 82b11b69a5dea38a4a036096528354a5a291a447 Mon Sep 17 00:00:00 2001 From: Vimal Date: Mon, 22 Oct 2018 16:44:21 +0530 Subject: [PATCH 1/4] Adding CoinSwitch exchange --- app/_locales/cs/messages.json | 9 +++++++ app/_locales/de/messages.json | 9 +++++++ app/_locales/en/messages.json | 9 +++++++ app/_locales/es/messages.json | 9 +++++++ app/_locales/fr/messages.json | 9 +++++++ app/_locales/hn/messages.json | 9 +++++++ app/_locales/ht/messages.json | 9 +++++++ app/_locales/it/messages.json | 9 +++++++ app/_locales/ja/messages.json | 9 +++++++ app/_locales/ko/messages.json | 9 +++++++ app/_locales/nl/messages.json | 9 +++++++ app/_locales/ph/messages.json | 9 +++++++ app/_locales/pt/messages.json | 9 +++++++ app/_locales/ru/messages.json | 9 +++++++ app/_locales/sl/messages.json | 9 +++++++ app/_locales/th/messages.json | 9 +++++++ app/_locales/tml/messages.json | 9 +++++++ app/_locales/tr/messages.json | 9 +++++++ app/_locales/vi/messages.json | 9 +++++++ app/_locales/zh_CN/messages.json | 9 +++++++ app/_locales/zh_TW/messages.json | 9 +++++++ app/images/coinswitch_logo.png | Bin 0 -> 3132 bytes app/scripts/lib/buy-eth-url.js | 4 +++ .../components/modals/deposit-ether-modal.js | 23 +++++++++++++++++- 24 files changed, 215 insertions(+), 1 deletion(-) create mode 100644 app/images/coinswitch_logo.png diff --git a/app/_locales/cs/messages.json b/app/_locales/cs/messages.json index ae2413ad9..88e62c28a 100644 --- a/app/_locales/cs/messages.json +++ b/app/_locales/cs/messages.json @@ -86,6 +86,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Ok" }, @@ -119,6 +125,9 @@ "continueToCoinbase": { "message": "Přejít na Coinbase" }, + "continueToCoinSwitch": { + "message": "Přejít na CoinSwitch" + }, "contractDeployment": { "message": "Nasazení kontraktu" }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 9e1eb9eac..919b66b3e 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -86,6 +86,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Ok" }, @@ -119,6 +125,9 @@ "continueToCoinbase": { "message": "Zu Coinbase fortfahren" }, + "continueToCoinSwitch": { + "message": "Zu CoinSwitch fortfahren" + }, "contractDeployment": { "message": "Smart Contract Ausführung" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index d8467e9eb..e53bd4405 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -116,6 +116,12 @@ "buyCoinbaseExplainer": { "message": "Coinbase is the world’s most popular way to buy and sell Bitcoin, Ethereum, and Litecoin." }, + "buyCoinSwitch": { + "message": "Buy on CoinSwitch" + }, + "buyCoinSwitchExplainer": { + "message": "CoinSwitch is the one-stop destination to exchange more than 300 cryptocurrencies at the best rate." + }, "bytes": { "message": "Bytes" }, @@ -197,6 +203,9 @@ "continueToCoinbase": { "message": "Continue to Coinbase" }, + "continueToCoinSwitch": { + "message": "Continue to CoinSwitch" + }, "contractDeployment": { "message": "Contract Deployment" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 3e43a7b43..7dc186f3e 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -86,6 +86,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Cancelar" }, @@ -131,6 +137,9 @@ "continueToCoinbase": { "message": "Continuar a Coinbase" }, + "continueToCoinSwitch": { + "message": "Continuar a CoinSwitch" + }, "contractDeployment": { "message": "Desplegar (Deploy) contrato" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index d418cd9aa..171f63b39 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -113,6 +113,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Bytes" }, @@ -194,6 +200,9 @@ "continueToCoinbase": { "message": "Continuer vers Coinbase" }, + "continueToCoinSwitch": { + "message": "Continuer vers CoinSwitch" + }, "contractDeployment": { "message": "Déploiement de contrat" }, diff --git a/app/_locales/hn/messages.json b/app/_locales/hn/messages.json index b869560e5..4d36eaf5d 100644 --- a/app/_locales/hn/messages.json +++ b/app/_locales/hn/messages.json @@ -83,6 +83,12 @@ "buyCoinbaseExplainer": { "message": "बिल्टकोइन, इथीरियम और लाइटकोइन खरीदने और बेचने के लिए दुनिया का सबसे लोकप्रिय तरीका कॉइनबेस है।" }, + "buyCoinSwitch": { + "message": "कॉइनस्विच पर खरीदें" + }, + "buyCoinSwitchExplainer": { + "message": "कॉइनस्विच 300 से अधिक क्रिप्टोक्रांसियों को सर्वोत्तम दर पर विनिमय करने का एक-स्टॉप गंतव्य है।" + }, "cancel": { "message": "रद्द करें" }, @@ -110,6 +116,9 @@ "continueToCoinbase": { "message": "कॉइनबेस को ब्हेजना जारी रखें" }, + "continueToCoinSwitch": { + "message": "कॉइनस्विच को ब्हेजना जारी रखें" + }, "contractDeployment": { "message": "अनुबंध परिनियोजन व तैनाती" }, diff --git a/app/_locales/ht/messages.json b/app/_locales/ht/messages.json index 50a0ec2bb..45f25d624 100644 --- a/app/_locales/ht/messages.json +++ b/app/_locales/ht/messages.json @@ -107,6 +107,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Bytes" }, @@ -164,6 +170,9 @@ "continueToCoinbase": { "message": "Kontinye Coinbase" }, + "continueToCoinSwitch": { + "message": "Kontinye CoinSwitch" + }, "contractDeployment": { "message": "Kontra Deplwaman" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 492bcc3de..dafdb319c 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -83,6 +83,12 @@ "buyCoinbaseExplainer": { "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." + }, "cancel": { "message": "Cancella" }, @@ -110,6 +116,9 @@ "continueToCoinbase": { "message": "Continua su Coinbase" }, + "continueToCoinSwitch": { + "message": "Continua su CoinSwitch" + }, "contractDeployment": { "message": "Distribuzione Contratto" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 7b25f386a..abac35b03 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -77,6 +77,12 @@ "buyCoinbaseExplainer": { "message": "Etherを購入できます。Coinbaseは、世界的なBitcoin、Ethereum、そしてLitecoinの取引所です。" }, + "buyCoinSwitch": { + "message": "CoinSwitchのサイトで購入" + }, + "buyCoinSwitchExplainer": { + "message": "CoinSwitchは、最高のレートで300以上の暗号化交換を行うワンストップの宛先です。" + }, "cancel": { "message": "キャンセル" }, @@ -104,6 +110,9 @@ "continueToCoinbase": { "message": "Coinbaseを開く" }, + "continueToCoinSwitch": { + "message": "CoinSwitchを開く" + }, "contractDeployment": { "message": "コントラクトのデプロイ" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 55549bb87..e2cf72296 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -101,6 +101,12 @@ "buyCoinbaseExplainer": { "message": "코인베이스는 비트코인, 이더리움, 라이트코인을 거래할 수 있는 유명한 거래소입니다." }, + "buyCoinSwitch": { + "message": "코인 스위치 구입" + }, + "buyCoinSwitchExplainer": { + "message": "코인 스위치는 최상의 속도로 300 개 이상의 크립토 카드를 교환하는 원 스톱 목적지입니다." + }, "bytes": { "message": "바이트" }, @@ -173,6 +179,9 @@ "continueToCoinbase": { "message": "코인베이스로 계속하기" }, + "continueToCoinSwitch": { + "message": "코인 스위치 계속하기" + }, "contractDeployment": { "message": "컨트랙트 배포" }, diff --git a/app/_locales/nl/messages.json b/app/_locales/nl/messages.json index e6d09c123..77d899df7 100644 --- a/app/_locales/nl/messages.json +++ b/app/_locales/nl/messages.json @@ -83,6 +83,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Annuleer" }, @@ -110,6 +116,9 @@ "continueToCoinbase": { "message": "Ga verder naar Coinbase" }, + "continueToCoinSwitch": { + "message": "Ga verder naar CoinSwitch" + }, "contractDeployment": { "message": "Contractimplementatie" }, diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json index 9a243447a..516b4eaaf 100644 --- a/app/_locales/ph/messages.json +++ b/app/_locales/ph/messages.json @@ -65,6 +65,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Kanselahin" }, @@ -86,6 +92,9 @@ "continueToCoinbase": { "message": "Magpatuloy sa Coinbase" }, + "continueToCoinSwitch": { + "message": "Magpatuloy sa CoinSwitch" + }, "contractDeployment": { "message": "Pag-deploy ng Contract" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 287ae0400..92d4ae8c7 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -83,6 +83,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Cancelar" }, @@ -110,6 +116,9 @@ "continueToCoinbase": { "message": "Continuar para o Coinbase" }, + "continueToCoinSwitch": { + "message": "Continuar para o CoinSwitch" + }, "contractDeployment": { "message": "Distribuição do Contrato" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 45bb09683..e95377c0c 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -86,6 +86,12 @@ "buyCoinbaseExplainer": { "message": "Биржа Coinbase – это наиболее популярный способ купить или продать Bitcoin, Ethereum и Litecoin." }, + "buyCoinSwitch": { + "message": "Купить на CoinSwitch" + }, + "buyCoinSwitchExplainer": { + "message": "CoinSwitch - это однонаправленное место для обмена более 300 криптоконверсий по наилучшей цене." + }, "ok": { "message": "ОК" }, @@ -119,6 +125,9 @@ "continueToCoinbase": { "message": "Продолжить в Coinbase" }, + "continueToCoinSwitch": { + "message": "Продолжить в CoinSwitch" + }, "contractDeployment": { "message": "Развертывание контракта" }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index a4b04d34b..94cda7b44 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -83,6 +83,12 @@ "buyCoinbaseExplainer": { "message": "Coinbase je najpopularnejši načun za kupovanje in prodajo bitcoinov, ethereuma, in litecoina." }, + "buyCoinSwitch": { + "message": "Kupi na CoinSwitch" + }, + "buyCoinSwitchExplainer": { + "message": "CoinSwitch je destinacija na enem mestu za izmenjavo več kot 300 kriptokotovitev po najboljši hitrosti." + }, "cancel": { "message": "Prekliči" }, @@ -110,6 +116,9 @@ "continueToCoinbase": { "message": "Nadaljuj na Coinbase" }, + "continueToCoinSwitch": { + "message": "Nadaljuj na CoinSwitch" + }, "contractDeployment": { "message": "Ustvarjanje pogodbe" }, diff --git a/app/_locales/th/messages.json b/app/_locales/th/messages.json index a9f2f1022..3bd0c7009 100644 --- a/app/_locales/th/messages.json +++ b/app/_locales/th/messages.json @@ -83,6 +83,12 @@ "buyCoinbaseExplainer": { "message": "Coinbase เป็นแหล่งซื้อขายบิตคอยน์ไลท์คอยน์และอีเธอเรียมที่ได้รับความนิยมสูงสุดในโลก" }, + "buyCoinSwitch": { + "message": "ซื้อด้วย CoinSwitch" + }, + "buyCoinSwitchExplainer": { + "message": "CoinSwitch เป็นจุดหมายปลายทางแบบครบวงจรในการแลกเปลี่ยนสกุลเงินมากกว่า 300 ครั้งในอัตราที่ดีที่สุด" + }, "cancel": { "message": "ยกเลิก" }, @@ -110,6 +116,9 @@ "continueToCoinbase": { "message": "ไปที่ Coinbase" }, + "continueToCoinSwitch": { + "message": "ไปที่ CoinSwitch" + }, "contractDeployment": { "message": "การติดตั้งสัญญา" }, diff --git a/app/_locales/tml/messages.json b/app/_locales/tml/messages.json index 8dc242c10..9de7dc768 100644 --- a/app/_locales/tml/messages.json +++ b/app/_locales/tml/messages.json @@ -86,6 +86,12 @@ "buyCoinbaseExplainer": { "message": "கோஇன்பசே பிறகாய்ன் , எதெரியும் மற்றும் ளிட்டசோன் வாங்க மற்றும் விற்க உலகின் மிகவும் பிரபலமான வழி" }, + "buyCoinSwitch": { + "message": "நாணயம் ஸ்விட்சில் வாங்கவும்" + }, + "buyCoinSwitchExplainer": { + "message": "சிறந்த விகிதத்தில் 300 க்கும் அதிகமான cryptocurrencies ஐ பரிமாறிக்கொள்ள ஒரு நாணயமாற்று இலக்கு நாணயம் ஸ்விட்ச் ஆகும்." + }, "ok": { "message": "சரி" }, @@ -119,6 +125,9 @@ "continueToCoinbase": { "message": "கோஇன்பசே ஐத் தொடரவும்" }, + "continueToCoinSwitch": { + "message": "நாணயம் மாறாமல் தொடர்க" + }, "contractDeployment": { "message": "ஒப்பந்த வரிசைப்படுத்தல்" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 0dac139dd..7f0374f95 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -86,6 +86,12 @@ "buyCoinbaseExplainer": { "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": { "message": "Tamam" }, @@ -119,6 +125,9 @@ "continueToCoinbase": { "message": "Coinbase'e devam et" }, + "continueToCoinSwitch": { + "message": "CoinSwitch'e devam et" + }, "contractDeployment": { "message": "Sözleşme kurulumu" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 782dfd119..e496114ee 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -65,6 +65,12 @@ "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" }, + "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": { "message": "Hủy" }, @@ -86,6 +92,9 @@ "continueToCoinbase": { "message": "Tiếp tục đến Coinbase" }, + "continueToCoinSwitch": { + "message": "Tiếp tục đến CoinSwitch" + }, "contractDeployment": { "message": "Triển khai hợp đồng" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 90ac2a55b..5c1397816 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -89,6 +89,12 @@ "buyCoinbaseExplainer": { "message": "Coinbase 是世界上最流行的买卖比特币,以太币和莱特币的交易所。" }, + "buyCoinSwitch": { + "message": "在CoinSwitch上购买" + }, + "buyCoinSwitchExplainer": { + "message": "CoinSwitch是以最优惠的价格交换超过300种加密货币的一站式目的地。" + }, "ok": { "message": "确认" }, @@ -128,6 +134,9 @@ "continueToCoinbase": { "message": "继续访问 Coinbase" }, + "continueToCoinSwitch": { + "message": "继续访问 CoinSwitch" + }, "contractDeployment": { "message": "合约部署" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index f71ce311f..b29b37c4e 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -86,6 +86,12 @@ "buyCoinbaseExplainer": { "message": "Coinbase 是世界上最流行的買賣比特幣,以太幣和萊特幣的交易所。" }, + "buyCoinSwitch": { + "message": "在CoinSwitch上购买" + }, + "buyCoinSwitchExplainer": { + "message": "CoinSwitch是以最优惠的价格交换超过300种加密货币的一站式目的地。" + }, "ok": { "message": "Ok" }, @@ -119,6 +125,9 @@ "continueToCoinbase": { "message": "繼續前往 Coinbase" }, + "continueToCoinSwitch": { + "message": "繼續前往 CoinSwitch" + }, "contractDeployment": { "message": "合約部署" }, diff --git a/app/images/coinswitch_logo.png b/app/images/coinswitch_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..445ecf02eef9bd1e86d18d596c908be49fad69f1 GIT binary patch literal 3132 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 Wlu`Tb4ulE-0000 { 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) @@ -187,6 +194,20 @@ DepositEtherModal.prototype.render = function () { 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({ logo: h('div.deposit-ether-modal__logo', { style: { From ab5fe4d65994ce66ed6b796197eda349fbe5d145 Mon Sep 17 00:00:00 2001 From: Vimal Date: Thu, 28 Feb 2019 19:50:48 +0530 Subject: [PATCH 2/4] PR 5575 review comment fixes --- app/scripts/lib/buy-eth-url.js | 47 ++++++++++--------- .../components/modals/deposit-ether-modal.js | 2 +- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/app/scripts/lib/buy-eth-url.js b/app/scripts/lib/buy-eth-url.js index 4b1572959..d434473ee 100644 --- a/app/scripts/lib/buy-eth-url.js +++ b/app/scripts/lib/buy-eth-url.js @@ -11,28 +11,29 @@ module.exports = getBuyEthUrl * network does not match any of the specified cases, or if no network is given, returns undefined. * */ -function getBuyEthUrl ({ network, amount, address }) { - let url - switch (network) { - case '1': - url = `https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${amount}&address=${address}&crypto_currency=ETH` - break - - case '3': - url = 'https://faucet.metamask.io/' - break - - case '4': - url = 'https://www.rinkeby.io/' - break - - case '42': - url = 'https://github.com/kovan-testnet/faucet' - break - - case '5': - url = `https://metamask.coinswitch.co/?address=${address}&to=eth` - break +function getBuyEthUrl({ network, amount, address, service }) { + let url + if (typeof network !== 'undefined') { + switch (network) { + case '1': + url = `https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${amount}&address=${address}&crypto_currency=ETH` + break + case '3': + url = 'https://faucet.metamask.io/' + break + case '4': + url = 'https://www.rinkeby.io/' + break + case '42': + url = 'https://github.com/kovan-testnet/faucet' + break + } + } else { + switch (service) { + case 'coinswitch': + url = `https://metamask.coinswitch.co/?address=${address}&to=eth` + break + } } - return url + return url } diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js index 6686eaefa..3f74dc065 100644 --- a/ui/app/components/modals/deposit-ether-modal.js +++ b/ui/app/components/modals/deposit-ether-modal.js @@ -32,7 +32,7 @@ function mapDispatchToProps (dispatch) { dispatch(actions.buyEth({ network: '1', address, amount: 0 })) }, toCoinSwitch: (address) => { - dispatch(actions.buyEth({ network: '5', address, amount: 0 })) + dispatch(actions.buyEth({ service: 'coinswitch', address, amount: 0 })) }, hideModal: () => { dispatch(actions.hideModal()) From 0ae68d1a612ec3999ded2ba6887c0f3b73ef27cd Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 29 Mar 2019 10:03:35 +0800 Subject: [PATCH 3/4] getBuyEthUrl - getDefaultServiceForNetwork then switch on service --- app/scripts/lib/buy-eth-url.js | 52 +++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/app/scripts/lib/buy-eth-url.js b/app/scripts/lib/buy-eth-url.js index d434473ee..46710a16f 100644 --- a/app/scripts/lib/buy-eth-url.js +++ b/app/scripts/lib/buy-eth-url.js @@ -12,28 +12,34 @@ module.exports = getBuyEthUrl * */ function getBuyEthUrl({ network, amount, address, service }) { - let url - if (typeof network !== 'undefined') { - switch (network) { - case '1': - url = `https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${amount}&address=${address}&crypto_currency=ETH` - break - case '3': - url = 'https://faucet.metamask.io/' - break - case '4': - url = 'https://www.rinkeby.io/' - break - case '42': - url = 'https://github.com/kovan-testnet/faucet' - break - } - } else { - switch (service) { - case 'coinswitch': - url = `https://metamask.coinswitch.co/?address=${address}&to=eth` - break - } + // default service by network if not specified + if (!service) service = getDefaultServiceForNetwork(network) + + switch (service) { + 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 (networkId) { + switch (network) { + case '1': + return 'coinbase' + case '3': + return 'metamask-faucet' + case '4': + return 'rinkeby-faucet' + case '42': + return 'kovan-faucet' } - return url + throw new Error(`No default cryptocurrency exchange or faucet for networkId: "${networkId}"`) } From b004b182bfafc317412d8dff1a43020db8dac3fe Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 29 Mar 2019 10:10:05 +0800 Subject: [PATCH 4/4] depoit-ether-modal - make buyEth args more explicit --- ui/app/components/modals/deposit-ether-modal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js index 3f74dc065..a64b3282e 100644 --- a/ui/app/components/modals/deposit-ether-modal.js +++ b/ui/app/components/modals/deposit-ether-modal.js @@ -29,10 +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, amount: 0 })) + dispatch(actions.buyEth({ service: 'coinswitch', address })) }, hideModal: () => { dispatch(actions.hideModal())