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
c8ae7097
Commit
c8ae7097
authored
Jun 27, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move TransactionReceiptResolver away
parent
1168d21c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
16 deletions
+25
-16
app.js
src/app.js
+2
-16
transactionReceiptResolver.js
src/transactionReceiptResolver.js
+23
-0
No files found.
src/app.js
View file @
c8ae7097
...
@@ -46,6 +46,7 @@ var BasicReadOnlyExplorer = require('./app/files/basicReadOnlyExplorer')
...
@@ -46,6 +46,7 @@ var BasicReadOnlyExplorer = require('./app/files/basicReadOnlyExplorer')
var
NotPersistedExplorer
=
require
(
'./app/files/NotPersistedExplorer'
)
var
NotPersistedExplorer
=
require
(
'./app/files/NotPersistedExplorer'
)
var
toolTip
=
require
(
'./app/ui/tooltip'
)
var
toolTip
=
require
(
'./app/ui/tooltip'
)
var
CommandInterpreter
=
require
(
'./lib/cmdInterpreter'
)
var
CommandInterpreter
=
require
(
'./lib/cmdInterpreter'
)
var
TransactionReceiptResolver
=
require
(
'./transactionReceiptResolver'
)
var
styleGuide
=
require
(
'./app/ui/styles-guide/theme-chooser'
)
var
styleGuide
=
require
(
'./app/ui/styles-guide/theme-chooser'
)
var
styles
=
styleGuide
.
chooser
()
var
styles
=
styleGuide
.
chooser
()
...
@@ -404,22 +405,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -404,22 +405,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
})
})
// ----------------- Tx listener -----------------
// ----------------- Tx listener -----------------
var
transactionReceiptResolver
=
{
var
transactionReceiptResolver
=
new
TransactionReceiptResolver
()
_transactionReceipts
:
{},
resolve
:
function
(
tx
,
cb
)
{
if
(
this
.
_transactionReceipts
[
tx
.
hash
])
{
return
cb
(
null
,
this
.
_transactionReceipts
[
tx
.
hash
])
}
executionContext
.
web3
().
eth
.
getTransactionReceipt
(
tx
.
hash
,
(
error
,
receipt
)
=>
{
if
(
!
error
)
{
this
.
_transactionReceipts
[
tx
.
hash
]
=
receipt
cb
(
null
,
receipt
)
}
else
{
cb
(
error
)
}
})
}
}
var
compiledContracts
=
function
()
{
var
compiledContracts
=
function
()
{
if
(
compiler
.
lastCompilationResult
&&
compiler
.
lastCompilationResult
.
data
)
{
if
(
compiler
.
lastCompilationResult
&&
compiler
.
lastCompilationResult
.
data
)
{
...
...
src/transactionReceiptResolver.js
0 → 100644
View file @
c8ae7097
'use strict'
var
executionContext
=
require
(
'./execution-context'
)
module
.
exports
=
class
TransactionReceiptResolver
{
constructor
()
{
this
.
_transactionReceipts
=
{}
}
resolve
(
tx
,
cb
)
{
if
(
this
.
_transactionReceipts
[
tx
.
hash
])
{
return
cb
(
null
,
this
.
_transactionReceipts
[
tx
.
hash
])
}
executionContext
.
web3
().
eth
.
getTransactionReceipt
(
tx
.
hash
,
(
error
,
receipt
)
=>
{
if
(
!
error
)
{
this
.
_transactionReceipts
[
tx
.
hash
]
=
receipt
cb
(
null
,
receipt
)
}
else
{
cb
(
error
)
}
})
}
}
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