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
691ec1cf
Commit
691ec1cf
authored
Sep 08, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try catch on sendTransation (metamask can throw)
parent
780e93b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
txRunner.js
src/app/execution/txRunner.js
+10
-6
No files found.
src/app/execution/txRunner.js
View file @
691ec1cf
...
@@ -64,13 +64,17 @@ TxRunner.prototype.execute = function (args, callback) {
...
@@ -64,13 +64,17 @@ 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
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
try
{
if
(
err
)
{
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
return
callback
(
err
,
resp
)
if
(
err
)
{
}
return
callback
(
err
,
resp
)
}
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