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
f3281515
Commit
f3281515
authored
Jun 21, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix fork label & add comment
parent
df76b5c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
settings.js
apps/remix-ide/src/app/tabs/runTab/settings.js
+7
-3
blockchain.js
apps/remix-ide/src/blockchain/blockchain.js
+4
-1
No files found.
apps/remix-ide/src/app/tabs/runTab/settings.js
View file @
f3281515
...
@@ -104,7 +104,7 @@ class SettingsUI {
...
@@ -104,7 +104,7 @@ class SettingsUI {
</option>
</option>
<option id="vm-mode-muirglacier"
<option id="vm-mode-muirglacier"
title="Execution environment does not connect to any node, everything is local and in memory only."
title="Execution environment does not connect to any node, everything is local and in memory only."
value="vm-istanbul" name="executionContext" fork="
istanbul"> JavaScript VM (Istanbul
)
value="vm-istanbul" name="executionContext" fork="
muirglacier"> JavaScript VM (Muirglacier
)
</option>
</option>
<option id="vm-mode-london"
<option id="vm-mode-london"
title="Execution environment does not connect to any node, everything is local and in memory only."
title="Execution environment does not connect to any node, everything is local and in memory only."
...
@@ -245,9 +245,9 @@ class SettingsUI {
...
@@ -245,9 +245,9 @@ class SettingsUI {
selectExEnv
.
addEventListener
(
'change'
,
(
event
)
=>
{
selectExEnv
.
addEventListener
(
'change'
,
(
event
)
=>
{
const
provider
=
selectExEnv
.
options
[
selectExEnv
.
selectedIndex
]
const
provider
=
selectExEnv
.
options
[
selectExEnv
.
selectedIndex
]
const
fork
=
provider
.
getAttribute
(
'fork'
)
const
fork
=
provider
.
getAttribute
(
'fork'
)
// can be undefined if connected to an external source (web3 provider / injected)
let
context
=
provider
.
value
let
context
=
provider
.
value
context
=
context
.
startsWith
(
'vm'
)
?
'vm'
:
context
context
=
context
.
startsWith
(
'vm'
)
?
'vm'
:
context
// context has to be 'vm', 'web3' or 'injected'
this
.
setExecutionContext
({
context
,
fork
})
this
.
setExecutionContext
({
context
,
fork
})
})
})
...
@@ -289,6 +289,10 @@ class SettingsUI {
...
@@ -289,6 +289,10 @@ class SettingsUI {
`
`
}
}
/**
* generate a value used by the env dropdown list.
* @return {String} - can return 'vm-berlin, 'vm-london', 'injected' or 'web3'
*/
_getProviderDropdownValue
()
{
_getProviderDropdownValue
()
{
const
provider
=
this
.
blockchain
.
getProvider
()
const
provider
=
this
.
blockchain
.
getProvider
()
const
fork
=
this
.
blockchain
.
getFork
()
const
fork
=
this
.
blockchain
.
getFork
()
...
...
apps/remix-ide/src/blockchain/blockchain.js
View file @
f3281515
...
@@ -208,7 +208,10 @@ class Blockchain {
...
@@ -208,7 +208,10 @@ class Blockchain {
return
this
.
executionContext
.
getProvider
()
return
this
.
executionContext
.
getProvider
()
}
}
getFork
()
{
/**
* return the fork name applied to the current envionment
* @return {String} - fork name
*/
return
this
.
executionContext
.
getCurrentFork
()
return
this
.
executionContext
.
getCurrentFork
()
}
}
...
...
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