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
a354e881
Commit
a354e881
authored
Aug 15, 2017
by
yann300
Committed by
GitHub
Aug 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #689 from ethereum/fixUnlockAccount
Fix: Display error in alert if transaction fail
parents
75daf5ac
802d5e73
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
3 deletions
+6
-3
txListener.js
src/app/execution/txListener.js
+2
-1
txRunner.js
src/app/execution/txRunner.js
+1
-0
run-tab.js
src/app/tabs/run-tab.js
+2
-1
universal-dapp.js
src/universal-dapp.js
+1
-1
No files found.
src/app/execution/txListener.js
View file @
a354e881
...
...
@@ -25,7 +25,8 @@ class TxListener {
this
.
startListening
(
context
)
}
})
opt
.
event
.
udapp
.
register
(
'transactionExecuted'
,
(
to
,
data
,
txResult
)
=>
{
opt
.
event
.
udapp
.
register
(
'transactionExecuted'
,
(
error
,
to
,
data
,
lookupOnly
,
txResult
)
=>
{
if
(
error
)
return
if
(
this
.
loopId
&&
this
.
_api
.
isVM
())
{
this
.
_api
.
web3
().
eth
.
getTransaction
(
txResult
.
transactionHash
,
(
error
,
tx
)
=>
{
if
(
error
)
return
console
.
log
(
error
)
...
...
src/app/execution/txRunner.js
View file @
a354e881
...
...
@@ -114,6 +114,7 @@ TxRunner.prototype.execute = function (args, callback) {
if
(
args
.
useCall
)
{
self
.
vm
.
stateManager
.
revert
(
function
()
{})
}
err
=
err
?
err
.
message
:
err
callback
(
err
,
{
result
:
result
,
transactionHash
:
ethJSUtil
.
bufferToHex
(
new
Buffer
(
tx
.
hash
()))
...
...
src/app/tabs/run-tab.js
View file @
a354e881
...
...
@@ -371,7 +371,8 @@ function settings (appAPI, appEvents) {
`
// EVENTS
appEvents
.
udapp
.
register
(
'transactionExecuted'
,
(
to
,
data
,
lookupOnly
,
txResult
)
=>
{
appEvents
.
udapp
.
register
(
'transactionExecuted'
,
(
error
,
to
,
data
,
lookupOnly
,
txResult
)
=>
{
if
(
error
)
return
if
(
!
lookupOnly
)
el
.
querySelector
(
'#value'
).
value
=
'0'
})
...
...
src/universal-dapp.js
View file @
a354e881
...
...
@@ -478,7 +478,7 @@ UniversalDApp.prototype.runTx = function (args, cb) {
function
(
callback
)
{
self
.
txRunner
.
rawRun
(
tx
,
function
(
error
,
result
)
{
if
(
!
args
.
useCall
)
{
self
.
event
.
trigger
(
'transactionExecuted'
,
[
args
.
to
,
args
.
data
,
result
])
self
.
event
.
trigger
(
'transactionExecuted'
,
[
error
,
args
.
to
,
args
.
data
,
false
,
result
])
}
callback
(
error
,
result
)
})
...
...
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