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
53d897f9
Commit
53d897f9
authored
Nov 30, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add renderInstanceFromABI
parent
187145ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
universal-dapp.js
src/universal-dapp.js
+5
-7
No files found.
src/universal-dapp.js
View file @
53d897f9
...
...
@@ -277,7 +277,7 @@ UniversalDApp.prototype.getBalance = function (address, cb) {
}
UniversalDApp
.
prototype
.
renderInstance
=
function
(
contract
,
address
,
contractName
)
{
var
abi
=
txHelper
.
sortAbiFunction
(
contract
.
abi
)
var
abi
=
txHelper
.
sortAbiFunction
(
contract
)
return
this
.
renderInstanceFromABI
(
abi
,
address
,
contractName
)
}
...
...
@@ -309,22 +309,20 @@ UniversalDApp.prototype.renderInstanceFromABI = function (contractABI, address,
$
(
instance
).
toggleClass
(
`
${
css
.
hidesub
}
`
)
}
var
abi
=
txHelper
.
sortAbiFunction
(
contractABI
)
instance
.
appendChild
(
title
)
// Add the fallback function
var
fallback
=
txHelper
.
getFallbackInterface
(
abi
)
var
fallback
=
txHelper
.
getFallbackInterface
(
contractABI
)
if
(
fallback
)
{
instance
.
appendChild
(
this
.
getCallButton
({
funABI
:
fallback
,
address
:
address
,
contractAbi
:
abi
,
contractAbi
:
contractABI
,
contractName
:
contractName
}))
}
$
.
each
(
abi
,
(
i
,
funABI
)
=>
{
$
.
each
(
contractABI
,
(
i
,
funABI
)
=>
{
if
(
funABI
.
type
!==
'function'
)
{
return
}
...
...
@@ -332,7 +330,7 @@ UniversalDApp.prototype.renderInstanceFromABI = function (contractABI, address,
instance
.
appendChild
(
this
.
getCallButton
({
funABI
:
funABI
,
address
:
address
,
contractAbi
:
abi
,
contractAbi
:
contractABI
,
contractName
:
contractName
}))
})
...
...
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