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
682f8af6
Commit
682f8af6
authored
Jun 02, 2016
by
chriseth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #46 from redsquirrel/udapp-refactoring
Clarifying UniversalDApp's constructor logic
parents
054dec78
9d78ffb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
universal-dapp.js
src/universal-dapp.js
+2
-4
No files found.
src/universal-dapp.js
View file @
682f8af6
...
@@ -13,9 +13,7 @@ function UniversalDApp (contracts, options) {
...
@@ -13,9 +13,7 @@ function UniversalDApp (contracts, options) {
this
.
contracts
=
contracts
;
this
.
contracts
=
contracts
;
this
.
renderOutputModifier
=
options
.
renderOutputModifier
||
function
(
name
,
content
)
{
return
content
;
};
this
.
renderOutputModifier
=
options
.
renderOutputModifier
||
function
(
name
,
content
)
{
return
content
;
};
if
(
!
options
.
vm
&&
web3
.
currentProvider
)
{
if
(
options
.
vm
)
{
}
else
if
(
options
.
vm
)
{
this
.
accounts
=
{};
this
.
accounts
=
{};
this
.
BN
=
ethJSUtil
.
BN
;
this
.
BN
=
ethJSUtil
.
BN
;
...
@@ -24,7 +22,7 @@ function UniversalDApp (contracts, options) {
...
@@ -24,7 +22,7 @@ function UniversalDApp (contracts, options) {
this
.
addAccount
(
'3cd7232cd6f3fc66a57a6bedc1a8ed6c228fff0a327e169c2bcc5e869ed49511'
);
this
.
addAccount
(
'3cd7232cd6f3fc66a57a6bedc1a8ed6c228fff0a327e169c2bcc5e869ed49511'
);
this
.
addAccount
(
'2ac6c190b09897cd8987869cc7b918cfea07ee82038d492abce033c75c1b1d0c'
);
this
.
addAccount
(
'2ac6c190b09897cd8987869cc7b918cfea07ee82038d492abce033c75c1b1d0c'
);
}
else
{
}
else
if
(
!
web3
.
currentProvider
)
{
var
host
=
options
.
host
||
"localhost"
;
var
host
=
options
.
host
||
"localhost"
;
var
port
=
options
.
port
||
"8545"
;
var
port
=
options
.
port
||
"8545"
;
var
rpc_url
=
options
.
getWeb3endpoint
?
options
.
getWeb3endpoint
()
:
(
'http://'
+
host
+
':'
+
port
);
var
rpc_url
=
options
.
getWeb3endpoint
?
options
.
getWeb3endpoint
()
:
(
'http://'
+
host
+
':'
+
port
);
...
...
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