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
ee41116c
Commit
ee41116c
authored
Dec 01, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use modalDialogCustom
parent
c9a27536
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
run-tab.js
src/app/tabs/run-tab.js
+10
-4
No files found.
src/app/tabs/run-tab.js
View file @
ee41116c
...
...
@@ -341,11 +341,17 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
var
contractNames
=
document
.
querySelector
(
`.
${
css
.
contractNames
.
classNames
[
0
]}
`
)
var
address
=
atAddressButtonInput
.
value
if
(
/.
(
.abi
)
$/
.
exec
(
appAPI
.
currentFile
()))
{
if
(
confirm
(
'Do you really want to interact with '
+
address
+
' using the current abi definition ?'
))
{
instanceContainer
.
appendChild
(
appAPI
.
udapp
().
renderInstance
(
appAPI
.
editorContent
(),
address
,
' - '
))
}
modalDialogCustom
.
confirm
(
null
,
'Do you really want to interact with '
+
address
+
' using the current ABI definition ?'
,
()
=>
{
var
abi
try
{
abi
=
JSON
.
parse
(
appAPI
.
editorContent
())
}
catch
(
e
)
{
return
modalDialogCustom
.
alert
(
'Failed to parse the current file as JSON ABI.'
)
}
instanceContainer
.
appendChild
(
appAPI
.
udapp
().
renderInstanceFromABI
(
abi
,
address
,
address
))
})
}
else
{
var
contract
=
appAPI
.
getContract
s
()[
contractNames
.
children
[
contractNames
.
selectedIndex
].
innerText
]
var
contract
=
appAPI
.
getContract
(
contractNames
.
children
[
contractNames
.
selectedIndex
].
innerHTML
)
instanceContainer
.
appendChild
(
appAPI
.
udapp
().
renderInstance
(
contract
.
object
,
address
,
selectContractNames
.
value
))
}
}
...
...
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