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
5ad8e182
Commit
5ad8e182
authored
Sep 12, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve logging
parent
fd078f90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
universal-dapp.js
src/universal-dapp.js
+13
-6
No files found.
src/universal-dapp.js
View file @
5ad8e182
...
...
@@ -13,7 +13,6 @@ var txFormat = require('./app/execution/txFormat')
var
txHelper
=
require
(
'./app/execution/txHelper'
)
var
txExecution
=
require
(
'./app/execution/txExecution'
)
var
helper
=
require
(
'./lib/helper'
)
var
modalDialogCustom
=
require
(
'./app/ui/modal-dialog-custom'
)
var
executionContext
=
require
(
'./execution-context'
)
// copy to copyToClipboard
...
...
@@ -313,13 +312,21 @@ UniversalDApp.prototype.getCallButton = function (args) {
})
function
call
(
isUserAction
)
{
var
logMsg
if
(
isUserAction
)
{
if
(
!
args
.
funABI
.
constant
)
{
logMsg
=
`transact to
${
args
.
contractName
}
.
${(
args
.
funABI
.
name
)
?
args
.
funABI
.
name
:
'(fallback)'
}
`
}
else
{
logMsg
=
`call to
${
args
.
contractName
}
.
${(
args
.
funABI
.
name
)
?
args
.
funABI
.
name
:
'(fallback)'
}
`
}
}
txFormat
.
buildData
(
args
.
contractAbi
,
self
.
contracts
,
false
,
args
.
funABI
,
inputField
.
val
(),
self
,
(
error
,
data
)
=>
{
if
(
!
error
)
{
if
(
isUserAction
)
{
if
(
!
args
.
funABI
.
constant
)
{
self
.
_api
.
logMessage
(
`
transact to
${
args
.
contractName
}
.
${(
args
.
funABI
.
name
)
?
args
.
funABI
.
name
:
'(fallback)'
}
pending ... `
)
self
.
_api
.
logMessage
(
`
${
logMsg
}
pending ... `
)
}
else
{
self
.
_api
.
logMessage
(
`
call to
${
args
.
contractName
}
.
${(
args
.
funABI
.
name
)
?
args
.
funABI
.
name
:
'(fallback)'
}
`
)
self
.
_api
.
logMessage
(
`
${
logMsg
}
`
)
}
}
txExecution
.
callFunction
(
args
.
address
,
data
,
args
.
funABI
,
self
,
(
error
,
txResult
)
=>
{
...
...
@@ -328,7 +335,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
if
(
isVM
)
{
var
vmError
=
txExecution
.
checkVMError
(
txResult
)
if
(
vmError
.
error
)
{
modalDialogCustom
.
alert
(
vmError
.
message
)
self
.
_api
.
logMessage
(
`
${
logMsg
}
errored:
${
vmError
.
message
}
`
)
return
}
}
...
...
@@ -337,11 +344,11 @@ UniversalDApp.prototype.getCallButton = function (args) {
$outputOverride
.
html
(
decoded
)
}
}
else
{
modalDialogCustom
.
alert
(
error
)
self
.
_api
.
logMessage
(
`
${
logMsg
}
errored:
${
error
}
`
)
}
})
}
else
{
modalDialogCustom
.
alert
(
error
)
self
.
_api
.
logMessage
(
`
${
logMsg
}
errored:
${
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