1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #1265 from MetaMask/ropsten-fix

Block explorer - fix ropsten links
This commit is contained in:
Dan Finlay 2017-03-27 11:45:05 -07:00 committed by GitHub
commit 4819f3a91d
4 changed files with 15 additions and 10 deletions

View File

@ -3,15 +3,15 @@ var linkGen = require('../../ui/lib/account-link')
describe('account-link', function() {
it('adds morden prefix to morden test network', function() {
var result = linkGen('account', '2')
assert.notEqual(result.indexOf('morden'), -1, 'testnet included')
it('adds ropsten prefix to ropsten test network', function() {
var result = linkGen('account', '3')
assert.notEqual(result.indexOf('ropsten'), -1, 'ropsten included')
assert.notEqual(result.indexOf('account'), -1, 'account included')
})
it('adds testnet prefix to ropsten test network', function() {
var result = linkGen('account', '3')
assert.notEqual(result.indexOf('testnet'), -1, 'testnet included')
it('adds kovan prefix to kovan test network', function() {
var result = linkGen('account', '42')
assert.notEqual(result.indexOf('kovan'), -1, 'kovan included')
assert.notEqual(result.indexOf('account'), -1, 'account included')
})

View File

@ -3,9 +3,14 @@ var linkGen = require('../../ui/lib/explorer-link')
describe('explorer-link', function() {
it('adds testnet prefix to morden test network', function() {
it('adds ropsten prefix to ropsten test network', function() {
var result = linkGen('hash', '3')
assert.notEqual(result.indexOf('testnet'), -1, 'testnet injected')
assert.notEqual(result.indexOf('ropsten'), -1, 'ropsten injected')
})
it('adds kovan prefix to kovan test network', function() {
var result = linkGen('hash', '42')
assert.notEqual(result.indexOf('kovan'), -1, 'kovan injected')
})
})

View File

@ -9,7 +9,7 @@ module.exports = function (address, network) {
link = `http://morden.etherscan.io/address/${address}`
break
case 3: // ropsten test net
link = `http://testnet.etherscan.io/address/${address}`
link = `http://ropsten.etherscan.io/address/${address}`
break
case 42: // kovan test net
link = `http://kovan.etherscan.io/address/${address}`

View File

@ -6,7 +6,7 @@ module.exports = function (hash, network) {
prefix = ''
break
case 3: // ropsten test net
prefix = 'testnet.'
prefix = 'ropsten.'
break
case 42: // kovan test net
prefix = 'kovan.'