Skip to content

Commit

Permalink
Merge pull request ethereum#607 from ngtuna/order-time
Browse files Browse the repository at this point in the history
add time to order
  • Loading branch information
ngtuna authored Aug 6, 2019
2 parents ac4fa8c + 3e26911 commit 117bd98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tomox/tomox.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ func (tomox *TomoX) InsertOrder(order *OrderItem) error {
if err := tomox.addPendingHash(order.Hash); err != nil {
return err
}
order.CreatedAt = uint64(time.Now().Unix())
if err := tomox.addOrderPending(order); err != nil {
return err
}
Expand Down Expand Up @@ -1365,6 +1366,7 @@ func (tomox *TomoX) updateStatusOfMatchedOrder(hashString string, filledAmount *
}
matchedOrder := val.(*OrderItem)
matchedOrder.Status = sdktypes.OrderStatusFilled
matchedOrder.UpdatedAt = uint64(time.Now().Unix())
updatedFillAmount := new(big.Int)
updatedFillAmount.Add(matchedOrder.FilledAmount, filledAmount)
matchedOrder.FilledAmount = updatedFillAmount
Expand Down

0 comments on commit 117bd98

Please sign in to comment.