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
44390f54
Commit
44390f54
authored
Sep 29, 2017
by
holgerd77
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify confusing and error-provoking context conditionals in executionContextChange
parent
70c7710b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
execution-context.js
src/execution-context.js
+18
-14
No files found.
src/execution-context.js
View file @
44390f54
...
@@ -128,25 +128,29 @@ function ExecutionContext () {
...
@@ -128,25 +128,29 @@ function ExecutionContext () {
})
})
}
}
if
(
context
===
'web3'
)
{
if
(
context
===
'vm'
)
{
modalDialogCustom
.
confirm
(
null
,
'Are you sure you want to connect to an ethereum node?'
,
executionContext
=
context
()
=>
{
runPrompt
(
endPointUrl
)
},
()
=>
{
cb
()
}
vm
.
stateManager
.
revert
(
function
()
{
)
vm
.
stateManager
.
checkpoint
()
}
else
if
(
context
===
'injected'
&&
injectedProvider
===
undefined
)
{
})
cb
()
self
.
event
.
trigger
(
'contextChanged'
,
[
'vm'
])
}
else
{
}
if
(
context
===
'injected'
)
{
if
(
context
===
'injected'
)
{
if
(
injectedProvider
===
undefined
)
{
cb
()
}
else
{
executionContext
=
context
executionContext
=
context
web3
.
setProvider
(
injectedProvider
)
web3
.
setProvider
(
injectedProvider
)
self
.
event
.
trigger
(
'contextChanged'
,
[
'injected'
])
self
.
event
.
trigger
(
'contextChanged'
,
[
'injected'
])
}
else
if
(
context
===
'vm'
)
{
executionContext
=
context
vm
.
stateManager
.
revert
(
function
()
{
vm
.
stateManager
.
checkpoint
()
})
self
.
event
.
trigger
(
'contextChanged'
,
[
'vm'
])
}
}
}
}
if
(
context
===
'web3'
)
{
modalDialogCustom
.
confirm
(
null
,
'Are you sure you want to connect to an ethereum node?'
,
()
=>
{
runPrompt
(
endPointUrl
)
},
()
=>
{
cb
()
}
)
}
}
}
this
.
currentblockGasLimit
=
function
()
{
this
.
currentblockGasLimit
=
function
()
{
...
...
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