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
23a7e373
Commit
23a7e373
authored
Dec 05, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Udapp: use the lookupOnly flag
parent
df52270a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
universal-dapp.js
src/universal-dapp.js
+4
-4
No files found.
src/universal-dapp.js
View file @
23a7e373
...
@@ -568,7 +568,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
...
@@ -568,7 +568,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
}
}
var
decoded
var
decoded
self
.
runTx
({
to
:
args
.
address
,
data
:
data
,
useCall
:
args
.
abi
.
constant
&&
!
isConstructor
},
function
(
err
,
txResult
)
{
self
.
runTx
({
to
:
args
.
address
,
data
:
data
,
useCall
:
lookupOnly
},
function
(
err
,
txResult
)
{
if
(
!
txResult
)
{
if
(
!
txResult
)
{
replaceOutput
(
$result
,
$
(
'<span/>'
).
text
(
'callback contain no result '
+
err
).
addClass
(
'error'
))
replaceOutput
(
$result
,
$
(
'<span/>'
).
text
(
'callback contain no result '
+
err
).
addClass
(
'error'
))
return
return
...
@@ -597,12 +597,12 @@ UniversalDApp.prototype.getCallButton = function (args) {
...
@@ -597,12 +597,12 @@ UniversalDApp.prototype.getCallButton = function (args) {
if
(
decoded
)
{
if
(
decoded
)
{
$result
.
append
(
decoded
)
$result
.
append
(
decoded
)
}
}
if
(
args
.
abi
.
constant
)
{
if
(
lookupOnly
)
{
$result
.
append
(
getDebugCall
(
txResult
))
$result
.
append
(
getDebugCall
(
txResult
))
}
else
{
}
else
{
$result
.
append
(
getDebugTransaction
(
txResult
))
$result
.
append
(
getDebugTransaction
(
txResult
))
}
}
}
else
if
(
args
.
abi
.
constant
&&
!
isConstructor
)
{
}
else
if
(
lookupOnly
)
{
clearOutput
(
$result
)
clearOutput
(
$result
)
$result
.
append
(
getReturnOutput
(
result
)).
append
(
getGasUsedOutput
({}))
$result
.
append
(
getReturnOutput
(
result
)).
append
(
getGasUsedOutput
({}))
...
@@ -639,7 +639,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
...
@@ -639,7 +639,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
var
$contractProperty
=
$
(
'<div class="contractProperty"/>'
)
var
$contractProperty
=
$
(
'<div class="contractProperty"/>'
)
$contractProperty
$contractProperty
.
toggleClass
(
'constant'
,
!
isConstructor
&&
args
.
abi
.
constant
)
.
toggleClass
(
'constant'
,
lookupOnly
)
.
toggleClass
(
'hasArgs'
,
args
.
abi
.
inputs
&&
args
.
abi
.
inputs
.
length
>
0
)
.
toggleClass
(
'hasArgs'
,
args
.
abi
.
inputs
&&
args
.
abi
.
inputs
.
length
>
0
)
.
toggleClass
(
'constructor'
,
isConstructor
)
.
toggleClass
(
'constructor'
,
isConstructor
)
.
append
(
button
)
.
append
(
button
)
...
...
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