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
5b03403b
Commit
5b03403b
authored
Feb 02, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint is king
parent
5a2a9a1a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
app.js
src/app.js
+3
-4
run-tab.js
src/app/tabs/run-tab.js
+2
-4
execution-context.js
src/execution-context.js
+3
-3
No files found.
src/app.js
View file @
5b03403b
...
...
@@ -784,9 +784,9 @@ function run () {
runCompiler
()
if
(
queryParams
.
get
().
context
)
{
let
context
=
queryParams
.
get
().
context
;
let
endPointUrl
=
queryParams
.
get
().
endPointUrl
;
executionContext
.
setContext
(
context
,
end
pointu
rl
,
let
context
=
queryParams
.
get
().
context
let
endPointUrl
=
queryParams
.
get
().
endPointUrl
executionContext
.
setContext
(
context
,
end
PointU
rl
,
()
=>
{
modalDialogCustom
.
confirm
(
null
,
'Are you sure you want to connect to an ethereum node?'
,
()
=>
{
if
(
!
endPointUrl
)
{
...
...
@@ -796,7 +796,6 @@ function run () {
executionContext
.
setProviderFromEndpoint
(
target
,
context
)
},
()
=>
{})
},
()
=>
{})
},
(
alertMsg
)
=>
{
modalDialogCustom
.
alert
(
alertMsg
)
...
...
src/app/tabs/run-tab.js
View file @
5b03403b
...
...
@@ -239,7 +239,7 @@ function runTab (container, appAPI, appEvents, opts) {
// DROPDOWN
var
selectExEnv
=
el
.
querySelector
(
'#selectExEnvOptions'
)
function
setFinalContext
()
{
function
setFinalContext
()
{
// set the final context. Cause it is possible that this is not the one we've originaly selected
selectExEnv
.
value
=
executionContext
.
getProvider
()
fillAccountsList
(
appAPI
,
el
)
...
...
@@ -247,9 +247,8 @@ function runTab (container, appAPI, appEvents, opts) {
}
selectExEnv
.
addEventListener
(
'change'
,
function
(
event
)
{
let
context
=
selectExEnv
.
options
[
selectExEnv
.
selectedIndex
].
value
;
let
context
=
selectExEnv
.
options
[
selectExEnv
.
selectedIndex
].
value
executionContext
.
executionContextChange
(
context
,
null
,
()
=>
{
modalDialogCustom
.
confirm
(
null
,
'Are you sure you want to connect to an ethereum node?'
,
()
=>
{
modalDialogCustom
.
prompt
(
null
,
'Web3 Provider Endpoint'
,
'http://localhost:8545'
,
(
target
)
=>
{
executionContext
.
setProviderFromEndpoint
(
target
,
context
,
(
alertMsg
)
=>
{
...
...
@@ -260,7 +259,6 @@ function runTab (container, appAPI, appEvents, opts) {
})
},
setFinalContext
)
},
setFinalContext
)
},
(
alertMsg
)
=>
{
modalDialogCustom
.
alert
(
alertMsg
)
},
setFinalContext
)
...
...
src/execution-context.js
View file @
5b03403b
...
...
@@ -166,7 +166,7 @@ function ExecutionContext () {
var
alertMsg
=
'No injected Web3 provider found. '
alertMsg
+=
'Make sure your provider (e.g. MetaMask) is active and running '
alertMsg
+=
'(when recently activated you may have to reload the page).'
infoCb
(
alertMsg
)
;
infoCb
(
alertMsg
)
return
cb
()
}
else
{
executionContext
=
context
...
...
@@ -177,7 +177,7 @@ function ExecutionContext () {
}
if
(
context
===
'web3'
)
{
confirmCb
(
cb
)
;
confirmCb
(
cb
)
}
}
...
...
@@ -221,7 +221,7 @@ function ExecutionContext () {
cb
(
alertMsg
)
}
}
this
.
setProviderFromEndpoint
=
setProviderFromEndpoint
;
this
.
setProviderFromEndpoint
=
setProviderFromEndpoint
}
module
.
exports
=
new
ExecutionContext
()
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