Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
5c323a24
Commit
5c323a24
authored
Jan 09, 2020
by
linj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix get price
fix listV2: use order v2
parent
310bafc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
local_order_v2.go
plugin/dapp/trade/executor/local_order_v2.go
+5
-1
No files found.
plugin/dapp/trade/executor/local_order_v2.go
View file @
5c323a24
...
@@ -161,6 +161,10 @@ func (r *OrderV2Row) isFinished() int {
...
@@ -161,6 +161,10 @@ func (r *OrderV2Row) isFinished() int {
}
}
func
(
r
*
OrderV2Row
)
price
()
string
{
func
(
r
*
OrderV2Row
)
price
()
string
{
// 在计算前缀时,返回空
if
r
.
AmountPerBoardlot
==
0
{
return
""
}
p
:=
calcPriceOfToken
(
r
.
PricePerBoardlot
,
r
.
AmountPerBoardlot
)
p
:=
calcPriceOfToken
(
r
.
PricePerBoardlot
,
r
.
AmountPerBoardlot
)
return
fmt
.
Sprintf
(
"%018d"
,
p
)
return
fmt
.
Sprintf
(
"%018d"
,
p
)
}
}
...
@@ -202,7 +206,7 @@ func listV2(db dbm.KVDB, indexName string, data *pty.LocalOrder, count, directio
...
@@ -202,7 +206,7 @@ func listV2(db dbm.KVDB, indexName string, data *pty.LocalOrder, count, directio
primary
=
[]
byte
(
data
.
TxIndex
)
primary
=
[]
byte
(
data
.
TxIndex
)
}
}
cur
:=
&
OrderRow
{
LocalOrder
:
data
}
cur
:=
&
Order
V2
Row
{
LocalOrder
:
data
}
index
,
err
:=
cur
.
Get
(
indexName
)
index
,
err
:=
cur
.
Get
(
indexName
)
if
err
!=
nil
{
if
err
!=
nil
{
tradelog
.
Error
(
"query List failed"
,
"key"
,
string
(
primary
),
"param"
,
data
,
"err"
,
err
)
tradelog
.
Error
(
"query List failed"
,
"key"
,
string
(
primary
),
"param"
,
data
,
"err"
,
err
)
...
...
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