aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-11-22 04:18:31 +0800
committerGitHub <noreply@github.com>2016-11-22 04:18:31 +0800
commitdb5a4eab710389eee47b9840c4bb964f7d49b6b9 (patch)
treea49e4e5e87a73df957f0638f375621c90056240c
parent268f6e10f30b579ddce99c22c2037b261e15a626 (diff)
parent7ab9d408201ae65ad30512f1361df61a487a9330 (diff)
downloadtangerine-wallet-browser-db5a4eab710389eee47b9840c4bb964f7d49b6b9.tar
tangerine-wallet-browser-db5a4eab710389eee47b9840c4bb964f7d49b6b9.tar.gz
tangerine-wallet-browser-db5a4eab710389eee47b9840c4bb964f7d49b6b9.tar.bz2
tangerine-wallet-browser-db5a4eab710389eee47b9840c4bb964f7d49b6b9.tar.lz
tangerine-wallet-browser-db5a4eab710389eee47b9840c4bb964f7d49b6b9.tar.xz
tangerine-wallet-browser-db5a4eab710389eee47b9840c4bb964f7d49b6b9.tar.zst
tangerine-wallet-browser-db5a4eab710389eee47b9840c4bb964f7d49b6b9.zip
Merge pull request #833 from MetaMask/i831-AddRopsten-Dev
Begin adding Ropsten support to dev
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/scripts/config.js4
-rw-r--r--app/scripts/lib/config-manager.js4
-rw-r--r--ui/app/app.js11
-rw-r--r--ui/app/components/drop-menu-item.js5
-rw-r--r--ui/app/components/network.js15
-rw-r--r--ui/app/css/lib.css2
-rw-r--r--ui/lib/account-link.js3
8 files changed, 41 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 177545214..c312f35bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## Current Master
+- Add support for the new, default Ropsten Test Network.
- Fix bug that would cause MetaMask to occasionally lose its StreamProvider connection and drop requests.
## 2.13.8 2016-11-16
diff --git a/app/scripts/config.js b/app/scripts/config.js
index e40b5e104..9a0f2a50b 100644
--- a/app/scripts/config.js
+++ b/app/scripts/config.js
@@ -1,5 +1,6 @@
const MAINET_RPC_URL = 'https://mainnet.infura.io/metamask'
-const TESTNET_RPC_URL = 'https://morden.infura.io/metamask'
+const TESTNET_RPC_URL = 'https://ropsten.infura.io/metamask'
+const MORDEN_RPC_URL = 'https://morden.infura.io/metamask'
const DEFAULT_RPC_URL = TESTNET_RPC_URL
global.METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
@@ -10,5 +11,6 @@ module.exports = {
default: DEFAULT_RPC_URL,
mainnet: MAINET_RPC_URL,
testnet: TESTNET_RPC_URL,
+ morden: MORDEN_RPC_URL,
},
}
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index faf64bfdc..8e63265d2 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -6,6 +6,7 @@ const ethUtil = require('ethereumjs-util')
const TESTNET_RPC = MetamaskConfig.network.testnet
const MAINNET_RPC = MetamaskConfig.network.mainnet
+const MORDEN_RPC = MetamaskConfig.network.morden
const txLimit = 40
/* The config-manager is a convenience object
@@ -182,6 +183,9 @@ ConfigManager.prototype.getCurrentRpcAddress = function () {
case 'testnet':
return TESTNET_RPC
+ case 'morden':
+ return MORDEN_RPC
+
default:
return provider && provider.rpcTarget ? provider.rpcTarget : TESTNET_RPC
}
diff --git a/ui/app/app.js b/ui/app/app.js
index 977392c57..7e63fa168 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -233,7 +233,7 @@ App.prototype.renderNetworkDropdown = function () {
}),
h(DropMenuItem, {
- label: 'Morden Test Network',
+ label: 'Ropsten Test Network',
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
action: () => props.dispatch(actions.setProviderType('testnet')),
icon: h('.menu-icon.red-dot'),
@@ -242,6 +242,15 @@ App.prototype.renderNetworkDropdown = function () {
}),
h(DropMenuItem, {
+ label: 'Morden Test Network',
+ closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
+ action: () => props.dispatch(actions.setProviderType('morden')),
+ icon: h('.menu-icon.red-dot'),
+ activeNetworkRender: props.network,
+ provider: props.provider,
+ }),
+
+ h(DropMenuItem, {
label: 'Localhost 8545',
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
action: () => props.dispatch(actions.setRpcTarget('http://localhost:8545')),
diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js
index 5c06101df..7cf686cab 100644
--- a/ui/app/components/drop-menu-item.js
+++ b/ui/app/components/drop-menu-item.js
@@ -41,9 +41,12 @@ DropMenuItem.prototype.activeNetworkRender = function () {
case 'Main Ethereum Network':
if (providerType === 'mainnet') return h('.check', '✓')
break
- case 'Morden Test Network':
+ case 'Ropsten Test Network':
if (provider.type === 'testnet') return h('.check', '✓')
break
+ case 'Morden Test Network':
+ if (provider.type === 'morden') return h('.check', '✓')
+ break
case 'Localhost 8545':
if (activeNetwork === 'http://localhost:8545') return h('.check', '✓')
break
diff --git a/ui/app/components/network.js b/ui/app/components/network.js
index 8e67dd741..9cf597648 100644
--- a/ui/app/components/network.js
+++ b/ui/app/components/network.js
@@ -35,6 +35,12 @@ Network.prototype.render = function () {
hoverText = 'Main Ethereum Network'
iconName = 'ethereum-network'
} else if (providerName === 'testnet') {
+ hoverText = 'Ropsten Test Network'
+ iconName = 'ropsten-test-network'
+ } else if (parseInt(networkNumber) === 3) {
+ hoverText = 'Ropsten Test Network'
+ iconName = 'ropsten-test-network'
+ } else if (parseInt(networkNumber) === 2) {
hoverText = 'Morden Test Network'
iconName = 'morden-test-network'
} else {
@@ -62,6 +68,15 @@ Network.prototype.render = function () {
}},
'Ethereum Main Net'),
])
+ case 'ropsten-test-network':
+ return h('.network-indicator', [
+ h('.menu-icon.red-dot'),
+ h('.network-name', {
+ style: {
+ color: '#ff6666',
+ }},
+ 'Ropsten Test Net'),
+ ])
case 'morden-test-network':
return h('.network-indicator', [
h('.menu-icon.red-dot'),
diff --git a/ui/app/css/lib.css b/ui/app/css/lib.css
index bcd6a4a67..f5f602729 100644
--- a/ui/app/css/lib.css
+++ b/ui/app/css/lib.css
@@ -213,7 +213,7 @@ hr.horizontal-line {
background: rgb(0, 163, 68);
border-radius: 20px;
}
-.morden-icon {
+.testnet-icon {
background: #2465E1;
}
diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js
index 479bf23d2..a29ba5e69 100644
--- a/ui/lib/account-link.js
+++ b/ui/lib/account-link.js
@@ -9,6 +9,9 @@ module.exports = function (address, network) {
case 2: // morden test net
link = `http://testnet.etherscan.io/address/${address}`
break
+ case 3: // ropsten test net
+ link = ''
+ break
default:
link = ''
break