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
e2fa3aeb
Commit
e2fa3aeb
authored
Dec 26, 2018
by
Iuri Matias
Committed by
yann300
Jan 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix call to logCallback
parent
e78afe69
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
app.js
src/app.js
+1
-1
universal-dapp-ui.js
src/universal-dapp-ui.js
+8
-7
universal-dapp.js
src/universal-dapp.js
+0
-1
No files found.
src/app.js
View file @
e2fa3aeb
...
@@ -320,7 +320,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -320,7 +320,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
if
(
txLink
)
registry
.
get
(
'logCallback'
).
api
.
logCallback
(
yo
`<a href="
${
txLink
}
" target="_blank">
${
txLink
}
</a>`
)
if
(
txLink
)
registry
.
get
(
'logCallback'
).
api
.
logCallback
(
yo
`<a href="
${
txLink
}
" target="_blank">
${
txLink
}
</a>`
)
})
})
var
udappUI
=
new
UniversalDAppUI
(
udapp
)
var
udappUI
=
new
UniversalDAppUI
(
udapp
,
registry
)
registry
.
put
({
api
:
udappUI
,
name
:
'udappUI'
})
registry
.
put
({
api
:
udappUI
,
name
:
'udappUI'
})
// ----------------- Tx listener -----------------
// ----------------- Tx listener -----------------
...
...
src/universal-dapp-ui.js
View file @
e2fa3aeb
...
@@ -21,8 +21,9 @@ var modalCustom = require('./app/ui/modal-dialog-custom')
...
@@ -21,8 +21,9 @@ var modalCustom = require('./app/ui/modal-dialog-custom')
var
modalDialog
=
require
(
'./app/ui/modaldialog'
)
var
modalDialog
=
require
(
'./app/ui/modaldialog'
)
var
TreeView
=
require
(
'./app/ui/TreeView'
)
var
TreeView
=
require
(
'./app/ui/TreeView'
)
function
UniversalDAppUI
(
udapp
,
opts
=
{}
)
{
function
UniversalDAppUI
(
udapp
,
registry
)
{
this
.
udapp
=
udapp
this
.
udapp
=
udapp
this
.
registry
=
registry
}
}
function
decodeResponseToTreeView
(
response
,
fnabi
)
{
function
decodeResponseToTreeView
(
response
,
fnabi
)
{
...
@@ -217,9 +218,9 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
...
@@ -217,9 +218,9 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
txFormat
.
buildData
(
args
.
contractName
,
args
.
contractAbi
,
self
.
udapp
.
data
.
contractsDetails
,
false
,
args
.
funABI
,
args
.
funABI
.
type
!==
'fallback'
?
value
:
''
,
(
error
,
data
)
=>
{
txFormat
.
buildData
(
args
.
contractName
,
args
.
contractAbi
,
self
.
udapp
.
data
.
contractsDetails
,
false
,
args
.
funABI
,
args
.
funABI
.
type
!==
'fallback'
?
value
:
''
,
(
error
,
data
)
=>
{
if
(
!
error
)
{
if
(
!
error
)
{
if
(
!
args
.
funABI
.
constant
)
{
if
(
!
args
.
funABI
.
constant
)
{
self
.
udapp
.
_deps
.
logCallback
(
`
${
logMsg
}
pending ... `
)
self
.
registry
.
logCallback
(
`
${
logMsg
}
pending ... `
)
}
else
{
}
else
{
self
.
udapp
.
_deps
.
logCallback
(
`
${
logMsg
}
`
)
self
.
registry
.
logCallback
(
`
${
logMsg
}
`
)
}
}
if
(
args
.
funABI
.
type
===
'fallback'
)
data
.
dataHex
=
value
if
(
args
.
funABI
.
type
===
'fallback'
)
data
.
dataHex
=
value
self
.
udapp
.
callFunction
(
args
.
address
,
data
,
args
.
funABI
,
confirmationCb
,
continueCb
,
promptCb
,
(
error
,
txResult
)
=>
{
self
.
udapp
.
callFunction
(
args
.
address
,
data
,
args
.
funABI
,
confirmationCb
,
continueCb
,
promptCb
,
(
error
,
txResult
)
=>
{
...
@@ -228,7 +229,7 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
...
@@ -228,7 +229,7 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
if
(
isVM
)
{
if
(
isVM
)
{
var
vmError
=
txExecution
.
checkVMError
(
txResult
)
var
vmError
=
txExecution
.
checkVMError
(
txResult
)
if
(
vmError
.
error
)
{
if
(
vmError
.
error
)
{
self
.
udapp
.
_deps
.
logCallback
(
`
${
logMsg
}
errored:
${
vmError
.
message
}
`
)
self
.
registry
.
logCallback
(
`
${
logMsg
}
errored:
${
vmError
.
message
}
`
)
return
return
}
}
}
}
...
@@ -237,14 +238,14 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
...
@@ -237,14 +238,14 @@ UniversalDAppUI.prototype.getCallButton = function (args) {
outputCb
(
decoded
)
outputCb
(
decoded
)
}
}
}
else
{
}
else
{
self
.
udapp
.
_deps
.
logCallback
(
`
${
logMsg
}
errored:
${
error
}
`
)
self
.
registry
.
logCallback
(
`
${
logMsg
}
errored:
${
error
}
`
)
}
}
})
})
}
else
{
}
else
{
self
.
udapp
.
_deps
.
logCallback
(
`
${
logMsg
}
errored:
${
error
}
`
)
self
.
registry
.
logCallback
(
`
${
logMsg
}
errored:
${
error
}
`
)
}
}
},
(
msg
)
=>
{
},
(
msg
)
=>
{
self
.
udapp
.
_deps
.
logCallback
(
msg
)
self
.
registry
.
logCallback
(
msg
)
},
(
data
,
runTxCallback
)
=>
{
},
(
data
,
runTxCallback
)
=>
{
// called for libraries deployment
// called for libraries deployment
self
.
udapp
.
runTx
(
data
,
confirmationCb
,
runTxCallback
)
self
.
udapp
.
runTx
(
data
,
confirmationCb
,
runTxCallback
)
...
...
src/universal-dapp.js
View file @
e2fa3aeb
...
@@ -10,7 +10,6 @@ var executionContext = remixLib.execution.executionContext
...
@@ -10,7 +10,6 @@ var executionContext = remixLib.execution.executionContext
function
UniversalDApp
(
globalRegistry
)
{
function
UniversalDApp
(
globalRegistry
)
{
this
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
this
.
data
=
{}
this
.
_deps
=
{
this
.
_deps
=
{
config
:
globalRegistry
.
get
(
'config'
).
api
,
config
:
globalRegistry
.
get
(
'config'
).
api
,
compiler
:
globalRegistry
.
get
(
'compiler'
).
api
compiler
:
globalRegistry
.
get
(
'compiler'
).
api
...
...
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