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
f80e2fae
Commit
f80e2fae
authored
Apr 08, 2016
by
chriseth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #129 from lastperson/patch-3
Fix runTx constant call with args to real eth node
parents
2d8ed0b5
ef8d8350
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
universal-dapp.js
assets/js/universal-dapp.js
+4
-7
No files found.
assets/js/universal-dapp.js
View file @
f80e2fae
...
...
@@ -434,10 +434,6 @@ UniversalDApp.prototype.runTx = function( data, args, cb) {
var
value
=
self
.
options
.
getValue
?
self
.
options
.
getValue
:
0
;
if
(
!
this
.
vm
)
{
if
(
constant
&&
!
isConstructor
)
{
var
func
=
web3
.
eth
.
contract
(
[
args
.
abi
]
).
at
(
to
);
func
[
args
.
abi
.
name
].
call
(
cb
);
}
else
{
var
tx
=
{
from
:
self
.
options
.
getAddress
?
self
.
options
.
getAddress
()
:
web3
.
eth
.
accounts
[
0
],
to
:
to
,
...
...
@@ -445,11 +441,12 @@ UniversalDApp.prototype.runTx = function( data, args, cb) {
gas
:
gas
,
value
:
value
};
if
(
constant
&&
!
isConstructor
)
{
web3
.
eth
.
call
(
tx
,
cb
);
}
else
{
web3
.
eth
.
estimateGas
(
tx
,
function
(
err
,
resp
){
tx
.
gas
=
resp
;
if
(
!
err
)
web3
.
eth
.
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
cb
(
err
,
resp
);
});
if
(
!
err
)
web3
.
eth
.
sendTransaction
(
tx
,
cb
);
else
cb
(
err
,
resp
);
});
}
...
...
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