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
bd6e4adc
Commit
bd6e4adc
authored
Jan 16, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve input parameter that might contain created{adress} like token
parent
968f2bba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
recorder.js
src/recorder.js
+20
-0
No files found.
src/recorder.js
View file @
bd6e4adc
...
@@ -212,6 +212,26 @@ class Recorder {
...
@@ -212,6 +212,26 @@ class Recorder {
cb
(
'cannot resolve abi'
)
cb
(
'cannot resolve abi'
)
return
return
}
}
if
(
tx
.
record
.
parameters
)
{
/* check if we have some params to resolve */
try
{
tx
.
record
.
parameters
.
forEach
((
value
,
index
)
=>
{
var
isString
=
true
if
(
typeof
value
!==
'string'
)
{
isString
=
false
value
=
JSON
.
stringify
(
value
)
}
for
(
var
timestamp
in
self
.
data
.
_createdContractsReverse
)
{
value
=
value
.
replace
(
new
RegExp
(
'created
\\
{'
+
timestamp
+
'
\\
}'
,
'g'
),
self
.
data
.
_createdContractsReverse
[
timestamp
])
}
if
(
!
isString
)
value
=
JSON
.
parse
(
value
)
tx
.
record
.
parameters
[
index
]
=
value
})
}
catch
(
e
)
{
modal
.
alert
(
'cannot resolve input parameters '
+
JSON
.
stringify
(
tx
.
record
.
parameters
)
+
'. Execution stopped at '
+
index
)
return
}
}
var
data
=
format
.
encodeData
(
fnABI
,
tx
.
record
.
parameters
,
tx
.
record
.
bytecode
)
var
data
=
format
.
encodeData
(
fnABI
,
tx
.
record
.
parameters
,
tx
.
record
.
bytecode
)
if
(
data
.
error
)
{
if
(
data
.
error
)
{
modal
.
alert
(
data
.
error
+
'. Record:'
+
JSON
.
stringify
(
record
,
null
,
'
\
t'
)
+
'. Execution stopped at '
+
index
)
modal
.
alert
(
data
.
error
+
'. Record:'
+
JSON
.
stringify
(
record
,
null
,
'
\
t'
)
+
'. Execution stopped at '
+
index
)
...
...
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