2020-01-09 04:34:58 +01:00
|
|
|
import assert from 'assert'
|
|
|
|
import getBuyEthUrl from '../../../app/scripts/lib/buy-eth-url'
|
2018-05-21 14:59:26 +02:00
|
|
|
|
2019-08-31 18:34:27 +02:00
|
|
|
describe('buy-eth-url', function () {
|
2018-05-21 14:59:26 +02:00
|
|
|
const mainnet = {
|
|
|
|
network: '1',
|
|
|
|
amount: 5,
|
|
|
|
address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
|
|
|
|
}
|
|
|
|
const ropsten = {
|
|
|
|
network: '3',
|
|
|
|
}
|
|
|
|
const rinkeby = {
|
|
|
|
network: '4',
|
|
|
|
}
|
|
|
|
const kovan = {
|
|
|
|
network: '42',
|
|
|
|
}
|
|
|
|
|
2019-11-22 16:13:23 +01:00
|
|
|
it('returns wyre url with address for network 1', function () {
|
2019-03-22 16:02:07 +01:00
|
|
|
const wyreUrl = getBuyEthUrl(mainnet)
|
|
|
|
|
2020-09-15 22:26:51 +02:00
|
|
|
assert.equal(wyreUrl, 'https://pay.sendwyre.com/purchase?dest=ethereum:0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc&destCurrency=ETH&accountId=AC-7AG3W4XH4N2&paymentMethod=debit-card')
|
2018-05-21 14:59:26 +02:00
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
it('returns metamask ropsten faucet for network 3', function () {
|
|
|
|
const ropstenUrl = getBuyEthUrl(ropsten)
|
|
|
|
assert.equal(ropstenUrl, 'https://faucet.metamask.io/')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('returns rinkeby dapp for network 4', function () {
|
|
|
|
const rinkebyUrl = getBuyEthUrl(rinkeby)
|
|
|
|
assert.equal(rinkebyUrl, 'https://www.rinkeby.io/')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('returns kovan github test faucet for network 42', function () {
|
|
|
|
const kovanUrl = getBuyEthUrl(kovan)
|
|
|
|
assert.equal(kovanUrl, 'https://github.com/kovan-testnet/faucet')
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|