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
f8f965ec
Commit
f8f965ec
authored
Aug 27, 2020
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix resolveTrace method
parent
d3207060
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
23 deletions
+21
-23
traceManager.js
libs/remix-lib/src/trace/traceManager.js
+21
-23
No files found.
libs/remix-lib/src/trace/traceManager.js
View file @
f8f965ec
...
...
@@ -18,31 +18,29 @@ function TraceManager (options) {
// init section
TraceManager
.
prototype
.
resolveTrace
=
async
function
(
tx
)
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
this
.
tx
=
tx
this
.
init
()
if
(
!
this
.
web3
)
reject
(
'web3 not loaded'
)
this
.
isLoading
=
true
try
{
const
result
=
await
this
.
getTrace
(
tx
.
hash
)
if
(
result
.
structLogs
.
length
>
0
)
{
this
.
trace
=
result
.
structLogs
this
.
traceAnalyser
.
analyse
(
result
.
structLogs
,
tx
)
this
.
isLoading
=
false
return
resolve
(
true
)
}
var
mes
=
tx
.
hash
+
' is not a contract invocation or contract creation.'
console
.
log
(
mes
)
this
.
isLoading
=
false
reject
(
mes
)
}
catch
(
error
)
{
console
.
log
(
error
)
this
.
tx
=
tx
this
.
init
()
if
(
!
this
.
web3
)
throw
new
Error
(
'web3 not loaded'
)
this
.
isLoading
=
true
try
{
const
result
=
await
this
.
getTrace
(
tx
.
hash
)
if
(
result
.
structLogs
.
length
>
0
)
{
this
.
trace
=
result
.
structLogs
this
.
traceAnalyser
.
analyse
(
result
.
structLogs
,
tx
)
this
.
isLoading
=
false
re
ject
(
error
)
re
turn
true
}
})
var
mes
=
tx
.
hash
+
' is not a contract invocation or contract creation.'
console
.
log
(
mes
)
this
.
isLoading
=
false
throw
new
Error
(
mes
)
}
catch
(
error
)
{
console
.
log
(
error
)
this
.
isLoading
=
false
throw
new
Error
(
error
)
}
}
TraceManager
.
prototype
.
getTrace
=
function
(
txHash
)
{
...
...
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