Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
45607696
Commit
45607696
authored
Dec 05, 2017
by
serapath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ADD polling network updates + ADD info icon to EIP155 link
parent
e57301e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
run-tab.js
src/app/tabs/run-tab.js
+3
-2
execution-context.js
src/execution-context.js
+1
-0
No files found.
src/app/tabs/run-tab.js
View file @
45607696
...
...
@@ -173,7 +173,7 @@ var css = csjs`
color: grey;
width: 100%;
height: 100%;
padding-right: 2
0
px;
padding-right: 2
8
px;
pointer-events: none;
}
.networkItem {
...
...
@@ -387,7 +387,7 @@ function settings (appAPI, appEvents) {
net
.
innerHTML
=
`<i class="
${
css
.
networkItem
}
fa fa-plug" aria-hidden="true"></i>
${
name
}
(
${
id
||
'-'
}
)`
})
}
updateNetwork
(
)
setInterval
(
updateNetwork
,
5000
)
var
el
=
yo
`
<div class="
${
css
.
settings
}
">
<div class="
${
css
.
crow
}
">
...
...
@@ -417,6 +417,7 @@ function settings (appAPI, appEvents) {
Web3 Provider
</option>
</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 class="
${
css
.
crow
}
">
...
...
src/execution-context.js
View file @
45607696
...
...
@@ -98,6 +98,7 @@ function ExecutionContext () {
this
.
web3
().
version
.
getNetwork
((
err
,
id
)
=>
{
var
name
=
null
if
(
err
)
name
=
'Unknown'
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md
else
if
(
id
===
'1'
)
name
=
'Main'
else
if
(
id
===
'2'
)
name
=
'Morden (deprecated)'
else
if
(
id
===
'3'
)
name
=
'Ropsten'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment