Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@
"buyCoinbaseExplainer": {
"message": "Coinbase is the world’s most popular way to buy and sell Bitcoin, Ethereum, and Litecoin."
},
"buyWithWyre": {
"message": "Buy ETH with Wyre"
},
"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!"
},
"bytes": {
"message": "Bytes"
},
Expand Down Expand Up @@ -293,6 +299,9 @@
"continueToCoinbase": {
"message": "Continue to Coinbase"
},
"continueToWyre": {
"message": "Continue to Wyre"
},
"contractDeployment": {
"message": "Contract Deployment"
},
Expand Down
9 changes: 9 additions & 0 deletions app/images/wyre.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/scripts/lib/buy-eth-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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`
url = `https://dash.sendwyre.com/sign-up`
break

case '3':
Expand Down
11 changes: 3 additions & 8 deletions test/unit/app/buy-eth-url.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ describe('', function () {
}

it('returns coinbase url with amount and address for network 1', function () {
const coinbaseUrl = getBuyEthUrl(mainnet)
const coinbase = coinbaseUrl.match(/(https:\/\/buy.coinbase.com)/)
const amount = coinbaseUrl.match(/(amount)\D\d/)
const address = coinbaseUrl.match(/(address)(.*)(?=&)/)

assert.equal(coinbase[0], 'https://buy.coinbase.com')
assert.equal(amount[0], 'amount=5')
assert.equal(address[0], 'address=0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc')
const wyreUrl = getBuyEthUrl(mainnet)

assert.equal(wyreUrl, 'https://dash.sendwyre.com/sign-up')

})

Expand Down
16 changes: 8 additions & 8 deletions ui/app/components/app/modals/deposit-ether-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import Button from '../../ui/button'

let DIRECT_DEPOSIT_ROW_TITLE
let DIRECT_DEPOSIT_ROW_TEXT
let COINBASE_ROW_TITLE
let COINBASE_ROW_TEXT
let WYRE_ROW_TITLE
let WYRE_ROW_TEXT
let SHAPESHIFT_ROW_TITLE
let SHAPESHIFT_ROW_TEXT
let FAUCET_ROW_TITLE
Expand Down Expand Up @@ -49,8 +49,8 @@ function DepositEtherModal (props, context) {
// need to set after i18n locale has loaded
DIRECT_DEPOSIT_ROW_TITLE = context.t('directDepositEther')
DIRECT_DEPOSIT_ROW_TEXT = context.t('directDepositEtherExplainer')
COINBASE_ROW_TITLE = context.t('buyCoinbase')
COINBASE_ROW_TEXT = context.t('buyCoinbaseExplainer')
WYRE_ROW_TITLE = context.t('buyWithWyre')
WYRE_ROW_TEXT = context.t('buyWithWyreDescription')
SHAPESHIFT_ROW_TITLE = context.t('depositShapeShift')
SHAPESHIFT_ROW_TEXT = context.t('depositShapeShiftExplainer')
FAUCET_ROW_TITLE = context.t('testFaucet')
Expand Down Expand Up @@ -176,13 +176,13 @@ DepositEtherModal.prototype.render = function () {
this.renderRow({
logo: h('div.deposit-ether-modal__logo', {
style: {
backgroundImage: 'url(\'./images/coinbase logo.png\')',
backgroundImage: 'url(\'./images/wyre.svg\')',
height: '40px',
},
}),
title: COINBASE_ROW_TITLE,
text: COINBASE_ROW_TEXT,
buttonLabel: this.context.t('continueToCoinbase'),
title: WYRE_ROW_TITLE,
text: WYRE_ROW_TEXT,
buttonLabel: this.context.t('continueToWyre'),
onButtonClick: () => toCoinbase(address),
hide: isTestNetwork || buyingWithShapeshift,
}),
Expand Down