Commit 45607696 authored by serapath's avatar serapath

ADD polling network updates + ADD info icon to EIP155 link

parent e57301e5
...@@ -173,7 +173,7 @@ var css = csjs` ...@@ -173,7 +173,7 @@ var css = csjs`
color: grey; color: grey;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-right: 20px; padding-right: 28px;
pointer-events: none; pointer-events: none;
} }
.networkItem { .networkItem {
...@@ -387,7 +387,7 @@ function settings (appAPI, appEvents) { ...@@ -387,7 +387,7 @@ function settings (appAPI, appEvents) {
net.innerHTML = `<i class="${css.networkItem} fa fa-plug" aria-hidden="true"></i> ${name}(${id || '-'})` net.innerHTML = `<i class="${css.networkItem} fa fa-plug" aria-hidden="true"></i> ${name}(${id || '-'})`
}) })
} }
updateNetwork() setInterval(updateNetwork, 5000)
var el = yo` var el = yo`
<div class="${css.settings}"> <div class="${css.settings}">
<div class="${css.crow}"> <div class="${css.crow}">
...@@ -417,6 +417,7 @@ function settings (appAPI, appEvents) { ...@@ -417,6 +417,7 @@ function settings (appAPI, appEvents) {
Web3 Provider Web3 Provider
</option> </option>
</select> </select>
<a style="margin-left: 8px;" href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md" target="_blank"><i class="fa fa-info"></i></a>
</div> </div>
</div> </div>
<div class="${css.crow}"> <div class="${css.crow}">
......
...@@ -98,6 +98,7 @@ function ExecutionContext () { ...@@ -98,6 +98,7 @@ function ExecutionContext () {
this.web3().version.getNetwork((err, id) => { this.web3().version.getNetwork((err, id) => {
var name = null var name = null
if (err) name = 'Unknown' if (err) name = 'Unknown'
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md
else if (id === '1') name = 'Main' else if (id === '1') name = 'Main'
else if (id === '2') name = 'Morden (deprecated)' else if (id === '2') name = 'Morden (deprecated)'
else if (id === '3') name = 'Ropsten' else if (id === '3') name = 'Ropsten'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment