Skip to content

Commit 4ff9126

Browse files
authored
Replaces the coinbase link in the deposit modal with one for wyre (#6302)
1 parent 174ec2d commit 4ff9126

File tree

5 files changed

+30
-17
lines changed

5 files changed

+30
-17
lines changed

app/_locales/en/messages.json

+9
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@
191191
"buyCoinbaseExplainer": {
192192
"message": "Coinbase is the world’s most popular way to buy and sell Bitcoin, Ethereum, and Litecoin."
193193
},
194+
"buyWithWyre": {
195+
"message": "Buy ETH with Wyre"
196+
},
197+
"buyWithWyreDescription": {
198+
"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!"
199+
},
194200
"bytes": {
195201
"message": "Bytes"
196202
},
@@ -296,6 +302,9 @@
296302
"continueToCoinbase": {
297303
"message": "Continue to Coinbase"
298304
},
305+
"continueToWyre": {
306+
"message": "Continue to Wyre"
307+
},
299308
"contractDeployment": {
300309
"message": "Contract Deployment"
301310
},

app/images/wyre.svg

+9
Loading

app/scripts/lib/buy-eth-url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function getBuyEthUrl ({ network, amount, address }) {
1515
let url
1616
switch (network) {
1717
case '1':
18-
url = `https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${amount}&address=${address}&crypto_currency=ETH`
18+
url = `https://dash.sendwyre.com/sign-up`
1919
break
2020

2121
case '3':

test/unit/app/buy-eth-url.spec.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,9 @@ describe('', function () {
1818
}
1919

2020
it('returns coinbase url with amount and address for network 1', function () {
21-
const coinbaseUrl = getBuyEthUrl(mainnet)
22-
const coinbase = coinbaseUrl.match(/(https:\/\/buy.coinbase.com)/)
23-
const amount = coinbaseUrl.match(/(amount)\D\d/)
24-
const address = coinbaseUrl.match(/(address)(.*)(?=&)/)
25-
26-
assert.equal(coinbase[0], 'https://buy.coinbase.com')
27-
assert.equal(amount[0], 'amount=5')
28-
assert.equal(address[0], 'address=0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc')
21+
const wyreUrl = getBuyEthUrl(mainnet)
22+
23+
assert.equal(wyreUrl, 'https://dash.sendwyre.com/sign-up')
2924

3025
})
3126

ui/app/components/app/modals/deposit-ether-modal.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import Button from '../../ui/button'
1111

1212
let DIRECT_DEPOSIT_ROW_TITLE
1313
let DIRECT_DEPOSIT_ROW_TEXT
14-
let COINBASE_ROW_TITLE
15-
let COINBASE_ROW_TEXT
14+
let WYRE_ROW_TITLE
15+
let WYRE_ROW_TEXT
1616
let SHAPESHIFT_ROW_TITLE
1717
let SHAPESHIFT_ROW_TEXT
1818
let FAUCET_ROW_TITLE
@@ -49,8 +49,8 @@ function DepositEtherModal (props, context) {
4949
// need to set after i18n locale has loaded
5050
DIRECT_DEPOSIT_ROW_TITLE = context.t('directDepositEther')
5151
DIRECT_DEPOSIT_ROW_TEXT = context.t('directDepositEtherExplainer')
52-
COINBASE_ROW_TITLE = context.t('buyCoinbase')
53-
COINBASE_ROW_TEXT = context.t('buyCoinbaseExplainer')
52+
WYRE_ROW_TITLE = context.t('buyWithWyre')
53+
WYRE_ROW_TEXT = context.t('buyWithWyreDescription')
5454
SHAPESHIFT_ROW_TITLE = context.t('depositShapeShift')
5555
SHAPESHIFT_ROW_TEXT = context.t('depositShapeShiftExplainer')
5656
FAUCET_ROW_TITLE = context.t('testFaucet')
@@ -176,13 +176,13 @@ DepositEtherModal.prototype.render = function () {
176176
this.renderRow({
177177
logo: h('div.deposit-ether-modal__logo', {
178178
style: {
179-
backgroundImage: 'url(\'./images/coinbase logo.png\')',
179+
backgroundImage: 'url(\'./images/wyre.svg\')',
180180
height: '40px',
181181
},
182182
}),
183-
title: COINBASE_ROW_TITLE,
184-
text: COINBASE_ROW_TEXT,
185-
buttonLabel: this.context.t('continueToCoinbase'),
183+
title: WYRE_ROW_TITLE,
184+
text: WYRE_ROW_TEXT,
185+
buttonLabel: this.context.t('continueToWyre'),
186186
onButtonClick: () => toCoinbase(address),
187187
hide: isTestNetwork || buyingWithShapeshift,
188188
}),

0 commit comments

Comments
 (0)