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
df52270a
Commit
df52270a
authored
Dec 05, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Udapp: don't expect inputs and outputs field to be present in the ABI
parent
cf239575
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
universal-dapp.js
src/universal-dapp.js
+4
-2
No files found.
src/universal-dapp.js
View file @
df52270a
...
...
@@ -400,12 +400,14 @@ UniversalDApp.prototype.getCallButton = function (args) {
var
lookupOnly
=
(
args
.
abi
.
constant
&&
!
isConstructor
)
var
inputs
=
''
if
(
args
.
abi
.
inputs
)
{
$
.
each
(
args
.
abi
.
inputs
,
function
(
i
,
inp
)
{
if
(
inputs
!==
''
)
{
inputs
+=
', '
}
inputs
+=
inp
.
type
+
' '
+
inp
.
name
})
}
var
inputField
=
$
(
'<input/>'
).
attr
(
'placeholder'
,
inputs
).
attr
(
'title'
,
inputs
)
var
$outputOverride
=
$
(
'<div class="value" />'
)
var
outputSpan
=
$
(
'<div class="output"/>'
)
...
...
@@ -535,7 +537,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
var
decodeResponse
=
function
(
response
)
{
// Only decode if there supposed to be fields
if
(
args
.
abi
.
outputs
.
length
>
0
)
{
if
(
args
.
abi
.
outputs
&&
args
.
abi
.
outputs
.
length
>
0
)
{
try
{
var
i
...
...
@@ -638,7 +640,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
var
$contractProperty
=
$
(
'<div class="contractProperty"/>'
)
$contractProperty
.
toggleClass
(
'constant'
,
!
isConstructor
&&
args
.
abi
.
constant
)
.
toggleClass
(
'hasArgs'
,
args
.
abi
.
inputs
.
length
>
0
)
.
toggleClass
(
'hasArgs'
,
args
.
abi
.
inputs
&&
args
.
abi
.
inputs
.
length
>
0
)
.
toggleClass
(
'constructor'
,
isConstructor
)
.
append
(
button
)
.
append
((
lookupOnly
&&
!
inputs
.
length
)
?
$outputOverride
:
inputField
)
...
...
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