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
f47657db
Commit
f47657db
authored
Apr 06, 2021
by
lianahus
Committed by
Liana Husikyan
Apr 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored
parent
101feb4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
settings.js
apps/remix-ide/src/app/tabs/runTab/settings.js
+19
-18
No files found.
apps/remix-ide/src/app/tabs/runTab/settings.js
View file @
f47657db
...
@@ -394,28 +394,29 @@ class SettingsUI {
...
@@ -394,28 +394,29 @@ class SettingsUI {
this
.
accountListCallId
++
this
.
accountListCallId
++
const
callid
=
this
.
accountListCallId
const
callid
=
this
.
accountListCallId
const
txOrigin
=
this
.
el
.
querySelector
(
'#txorigin'
)
const
txOrigin
=
this
.
el
.
querySelector
(
'#txorigin'
)
let
accounts
=
[]
try
{
try
{
let
accounts
=
await
this
.
blockchain
.
getAccounts
()
accounts
=
await
this
.
blockchain
.
getAccounts
()
if
(
this
.
accountListCallId
>
callid
)
return
this
.
accountListCallId
++
if
(
!
accounts
)
accounts
=
[]
for
(
var
loadedaddress
in
this
.
loadedAccounts
)
{
if
(
accounts
.
indexOf
(
loadedaddress
)
===
-
1
)
{
txOrigin
.
removeChild
(
txOrigin
.
querySelector
(
'option[value="'
+
loadedaddress
+
'"]'
))
delete
this
.
loadedAccounts
[
loadedaddress
]
}
}
for
(
var
i
in
accounts
)
{
const
address
=
accounts
[
i
]
if
(
!
this
.
loadedAccounts
[
address
])
{
txOrigin
.
appendChild
(
yo
`<option value="
${
address
}
" >
${
address
}
</option>`
)
this
.
loadedAccounts
[
address
]
=
1
}
}
txOrigin
.
setAttribute
(
'value'
,
accounts
[
0
])
}
catch
(
e
)
{
}
catch
(
e
)
{
addTooltip
(
`Cannot get account list:
${
e
}
`
)
addTooltip
(
`Cannot get account list:
${
e
}
`
)
}
}
if
(
!
accounts
)
accounts
=
[]
if
(
this
.
accountListCallId
>
callid
)
return
this
.
accountListCallId
++
for
(
var
loadedaddress
in
this
.
loadedAccounts
)
{
if
(
accounts
.
indexOf
(
loadedaddress
)
===
-
1
)
{
txOrigin
.
removeChild
(
txOrigin
.
querySelector
(
'option[value="'
+
loadedaddress
+
'"]'
))
delete
this
.
loadedAccounts
[
loadedaddress
]
}
}
for
(
var
i
in
accounts
)
{
const
address
=
accounts
[
i
]
if
(
!
this
.
loadedAccounts
[
address
])
{
txOrigin
.
appendChild
(
yo
`<option value="
${
address
}
" >
${
address
}
</option>`
)
this
.
loadedAccounts
[
address
]
=
1
}
}
txOrigin
.
setAttribute
(
'value'
,
accounts
[
0
])
}
}
}
}
...
...
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