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
d19e441f
Commit
d19e441f
authored
Jul 24, 2020
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor extractMappingsLocationChanges
parent
6698706e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
storageViewer.js
libs/remix-debug/src/storage/storageViewer.js
+5
-10
No files found.
libs/remix-debug/src/storage/storageViewer.js
View file @
d19e441f
...
@@ -77,13 +77,8 @@ class StorageViewer {
...
@@ -77,13 +77,8 @@ class StorageViewer {
async
mappingsLocation
(
corrections
)
{
async
mappingsLocation
(
corrections
)
{
if
(
!
this
.
currentMappingsLocationPromise
)
{
if
(
!
this
.
currentMappingsLocationPromise
)
{
this
.
currentMappingsLocationPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
currentMappingsLocationPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
extractMappingsLocationChanges
(
this
.
storageChanges
,
corrections
,
(
error
,
mappingsLocationChanges
)
=>
{
const
mappingsLocationChanges
=
this
.
extractMappingsLocationChanges
(
this
.
storageChanges
,
corrections
)
if
(
error
)
{
return
resolve
(
mappingsLocationChanges
)
reject
(
error
)
}
else
{
resolve
(
mappingsLocationChanges
)
}
})
})
})
}
}
return
this
.
currentMappingsLocationPromise
return
this
.
currentMappingsLocationPromise
...
@@ -94,13 +89,13 @@ class StorageViewer {
...
@@ -94,13 +89,13 @@ class StorageViewer {
* @param {Map} storageChanges
* @param {Map} storageChanges
* @param {Array} corrections - used in case the calculated sha3 has been modifyed before SSTORE (notably used for struct in mapping).
* @param {Array} corrections - used in case the calculated sha3 has been modifyed before SSTORE (notably used for struct in mapping).
*/
*/
extractMappingsLocationChanges
(
storageChanges
,
corrections
,
callback
)
{
extractMappingsLocationChanges
(
storageChanges
,
corrections
)
{
if
(
this
.
mappingsLocationChanges
)
{
if
(
this
.
mappingsLocationChanges
)
{
return
callback
(
null
,
this
.
mappingsLocationChanges
)
return
this
.
mappingsLocationChanges
}
}
const
mappings
=
mappingPreimages
.
decodeMappingsKeys
(
this
.
web3
,
storageChanges
,
corrections
)
const
mappings
=
mappingPreimages
.
decodeMappingsKeys
(
this
.
web3
,
storageChanges
,
corrections
)
this
.
mappingsLocationChanges
=
mappings
this
.
mappingsLocationChanges
=
mappings
return
callback
(
null
,
this
.
mappingsLocationChanges
)
return
this
.
mappingsLocationChanges
}
}
}
}
...
...
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