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
b454a9a0
Commit
b454a9a0
authored
Sep 11, 2017
by
yann300
Committed by
GitHub
Sep 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #782 from ethereum/invalidAddress
Try catch on sendTransaction (metamask can throw)
parents
780e93b3
691ec1cf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
txRunner.js
src/app/execution/txRunner.js
+4
-0
No files found.
src/app/execution/txRunner.js
View file @
b454a9a0
...
@@ -64,6 +64,7 @@ TxRunner.prototype.execute = function (args, callback) {
...
@@ -64,6 +64,7 @@ TxRunner.prototype.execute = function (args, callback) {
}
}
tx
.
gas
=
gasEstimation
tx
.
gas
=
gasEstimation
var
sendTransaction
=
self
.
personalMode
?
executionContext
.
web3
().
personal
.
sendTransaction
:
executionContext
.
web3
().
eth
.
sendTransaction
var
sendTransaction
=
self
.
personalMode
?
executionContext
.
web3
().
personal
.
sendTransaction
:
executionContext
.
web3
().
eth
.
sendTransaction
try
{
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
if
(
err
)
{
if
(
err
)
{
return
callback
(
err
,
resp
)
return
callback
(
err
,
resp
)
...
@@ -71,6 +72,9 @@ TxRunner.prototype.execute = function (args, callback) {
...
@@ -71,6 +72,9 @@ TxRunner.prototype.execute = function (args, callback) {
tryTillResponse
(
resp
,
callback
)
tryTillResponse
(
resp
,
callback
)
})
})
}
catch
(
e
)
{
return
callback
(
`Send transaction failed:
${
e
.
message
}
. if you use an injected provider, please check it is properly unlocked. `
)
}
})
})
}
}
}
else
{
}
else
{
...
...
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