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
e0192b56
Commit
e0192b56
authored
Jan 16, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move execute fn
parent
92e955c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
txRunner.js
src/app/execution/txRunner.js
+14
-14
No files found.
src/app/execution/txRunner.js
View file @
e0192b56
...
...
@@ -44,6 +44,20 @@ TxRunner.prototype.rawRun = function (args, cb) {
}
TxRunner
.
prototype
.
execute
=
function
(
args
,
callback
)
{
function
execute
()
{
var
sendTransaction
=
self
.
personalMode
?
executionContext
.
web3
().
personal
.
sendTransaction
:
executionContext
.
web3
().
eth
.
sendTransaction
try
{
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
if
(
err
)
{
return
callback
(
err
,
resp
)
}
tryTillResponse
(
resp
,
callback
)
})
}
catch
(
e
)
{
return
callback
(
`Send transaction failed:
${
e
.
message
}
. if you use an injected provider, please check it is properly unlocked. `
)
}
}
var
self
=
this
var
from
=
args
.
from
var
to
=
args
.
to
...
...
@@ -72,20 +86,6 @@ TxRunner.prototype.execute = function (args, callback) {
})
})
}
else
{
function
execute
()
{
var
sendTransaction
=
self
.
personalMode
?
executionContext
.
web3
().
personal
.
sendTransaction
:
executionContext
.
web3
().
eth
.
sendTransaction
try
{
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
if
(
err
)
{
return
callback
(
err
,
resp
)
}
tryTillResponse
(
resp
,
callback
)
})
}
catch
(
e
)
{
return
callback
(
`Send transaction failed:
${
e
.
message
}
. if you use an injected provider, please check it is properly unlocked. `
)
}
}
executionContext
.
web3
().
eth
.
estimateGas
(
tx
,
function
(
err
,
gasEstimation
)
{
if
(
err
)
{
return
callback
(
err
,
gasEstimation
)
...
...
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