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
93d240df
Commit
93d240df
authored
Apr 26, 2016
by
chriseth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #151 from axic/patch/account-cleanup
Cosmetic cleanup of the account code
parents
2875a5bb
f48306ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app.js
assets/js/app.js
+0
-4
universal-dapp.js
assets/js/universal-dapp.js
+4
-0
No files found.
assets/js/app.js
View file @
93d240df
...
@@ -890,11 +890,7 @@ $(document).ready(function() {
...
@@ -890,11 +890,7 @@ $(document).ready(function() {
}
else
$txOrigin
.
val
(
'unknown'
);
}
else
$txOrigin
.
val
(
'unknown'
);
}
}
if
(
executionContext
===
'vm'
)
{
dapp
.
getAccounts
(
renderAccounts
);
dapp
.
getAccounts
(
renderAccounts
);
}
else
{
web3
.
eth
.
getAccounts
(
renderAccounts
);
}
$contractOutput
.
find
(
'.title'
).
click
(
function
(
ev
){
$
(
this
).
closest
(
'.contract'
).
toggleClass
(
'hide'
);
});
$contractOutput
.
find
(
'.title'
).
click
(
function
(
ev
){
$
(
this
).
closest
(
'.contract'
).
toggleClass
(
'hide'
);
});
$
(
'#output'
).
append
(
$contractOutput
);
$
(
'#output'
).
append
(
$contractOutput
);
...
...
assets/js/universal-dapp.js
View file @
93d240df
...
@@ -38,9 +38,13 @@ UniversalDApp.prototype.addAccount = function (privateKey, balance) {
...
@@ -38,9 +38,13 @@ UniversalDApp.prototype.addAccount = function (privateKey, balance) {
};
};
UniversalDApp
.
prototype
.
getAccounts
=
function
(
cb
)
{
UniversalDApp
.
prototype
.
getAccounts
=
function
(
cb
)
{
if
(
!
this
.
vm
)
{
web3
.
eth
.
getAccounts
(
cb
);
}
else
{
if
(
!
this
.
accounts
)
return
cb
(
"No accounts?"
);
if
(
!
this
.
accounts
)
return
cb
(
"No accounts?"
);
cb
(
null
,
Object
.
keys
(
this
.
accounts
));
cb
(
null
,
Object
.
keys
(
this
.
accounts
));
}
};
};
UniversalDApp
.
prototype
.
render
=
function
()
{
UniversalDApp
.
prototype
.
render
=
function
()
{
...
...
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